-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce a install-conjure action (#205)
* and again! * CI: make install-conjure an action * CI: Another hyphen typo * Another hypen! * Fix typo, the path does not update until the next action is run, so we cant check if this worked * a * lets try this * some debugging * more testing * Found it! * b
- Loading branch information
1 parent
07e2d8d
commit c841010
Showing
5 changed files
with
57 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: 'Install Conjure' | ||
description: 'Install Conjure' | ||
inputs: | ||
version: | ||
description: 'The version of conjure to install.' | ||
required: false | ||
default: "2.5.1" | ||
os_arch: | ||
description: 'The OS / Architecture to use. Supported values are ["linux","macos-arm","macos-intel"]' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
if [ "$(conjure --version | head -n2 | tail -n1)" == "Release version ${{ inputs.version }}" ]; then | ||
echo "Found conjure, not fetching again." | ||
else | ||
mkdir -p "${HOME}/conjure" | ||
cd "${HOME}/conjure" | ||
echo "Downloading conjure." | ||
rm -rf conjure-v${{ inputs.version }}-${{ inputs.os_arch }}-with-solvers* | ||
wget https://github.com/conjure-cp/conjure/releases/download/v${{ inputs.version }}/conjure-v${{ inputs.version }}-${{ inputs.os_arch }}-with-solvers.zip | ||
unzip conjure-v${{ inputs.version }}-${{ inputs.os_arch }}-with-solvers.zip | ||
echo "Adding conjure to path." | ||
# this prepends to path (so imagemagick doesnt interfere!), and does not take effect until the next step runs. | ||
echo "${HOME}/conjure/conjure-v${{ inputs.version }}-${{ inputs.os_arch }}-with-solvers/" >> ${GITHUB_PATH} | ||
fi | ||
shell: bash | ||
- name: Check that conjure is installed correctly | ||
run: | | ||
if [ "$(conjure --version | head -n2 | tail -n1)" != "Release version ${{ inputs.version }}" ]; then | ||
echo "Correct conjure not found in path." | ||
conjure --version | ||
exit 1 | ||
fi | ||
shell: bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters