-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add CI steps to specify which AnyBodyCon is used
- Loading branch information
Showing
4 changed files
with
112 additions
and
48 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,42 @@ | ||
# This aciton will only work on Windows runners | ||
|
||
name: 'Use Custom AnyBodyCon from Azure Blob storage' | ||
|
||
description: 'Download specific anybodycon version from Azure Blob storage' | ||
|
||
inputs: | ||
custom-anybodycon: # path | ||
description: 'The AnyBodyCon version to use' | ||
required: true | ||
connection-string: | ||
description: 'The connection string to the Azure Blob storage' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Create temp location for AnyBodyCon | ||
if: ${{ inputs.custom-anybodycon }} | ||
shell: powershell | ||
run: mkdir -p ${{ runner.temp }}/$(split-path ${{ inputs.custom-anybodycon }} -Parent) | ||
|
||
- name: Get special AnyBodyCon version | ||
if: ${{ inputs.custom-anybodycon }} | ||
uses: armanrahman22/azblob-download-action@main | ||
with: | ||
connection-string: ${{ inputs.connection-string }} | ||
container-name: "anybodycon" | ||
blob-name: ${{ inputs.custom-anybodycon }} | ||
download-path: ${{ runner.temp }} | ||
|
||
- name: Overwrite AnyBodyCon | ||
if: ${{ inputs.custom-anybodycon }} | ||
shell: powershell | ||
run: | | ||
cp ${{ runner.temp }}\${{ inputs.custom-anybodycon }} "$(split-path $Env:ANYBODYCON -Parent)/AnyBodyConCustom.any" | ||
echo "ANYBODYCON=$(split-path $Env:ANYBODYCON -Parent)\AnyBodyConCustom.any" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
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 @@ | ||
# This aciton will only work on Windows runners | ||
|
||
name: 'Install Micro mamba' | ||
|
||
description: 'Download and install micromamba on the selfhosted runner' | ||
|
||
inputs: | ||
environment-file: # path | ||
description: 'A conda environment file to install' | ||
required: false | ||
default: '' | ||
environment-name: | ||
description: 'The name of the conda environment to create' | ||
required: false | ||
default: '' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install conda | ||
shell: powershell | ||
run: | | ||
Invoke-Webrequest -URI https://anaconda.org/conda-forge/micromamba/1.4.3/download/win-64/micromamba-1.4.3-0.tar.bz2 -OutFile ~\micromamba.tar.bz2 | ||
if ((Get-FileHash ~\micromamba.tar.bz2).hash -ne "173D2A8DD8E324611FA7331992896EBF7EA2F953C61559C10772EE377AF27D05") {exit 1} | ||
$env:Path = "C:\PROGRA~1\Git\usr\bin;" + $env:Path | ||
tar -xvjf ~/micromamba.tar.bz2 --strip-components 2 -C ~ Library/bin/micromamba.exe | ||
echo "MAMBA_ROOT_PREFIX=$HOME\micromamba" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
- name: Create conda environment (custom name) | ||
if: inputs.environment-file != '' && inputs.environment-name != '' | ||
shell: powershell | ||
run: | | ||
~\micromamba.exe shell hook -s powershell | Out-String | iex | ||
micromamba create --allow-downgrade -y -n ${{ inputs.environment-name }} -f ${{ inputs.environment-file }} | ||
- name: Create conda environment | ||
if: inputs.environment-file != '' && inputs.environment-name == '' | ||
shell: powershell | ||
run: | | ||
~\micromamba.exe shell hook -s powershell | Out-String | iex | ||
micromamba create --allow-downgrade -y -f ${{ inputs.environment-file }} |
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