Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #159
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
# Copyright (c) 2021 University System of Georgia and GTCOARLab Contributors | |
# Distributed under the terms of the BSD-3-Clause License | |
# yamllint disable rule:truthy rule:line-length rule:comments-indentation | |
name: CI | |
on: | |
push: | |
branches: [master, dev] | |
pull_request: | |
branches: [master, dev] | |
create: | |
tags: [v*] | |
env: | |
PYTHONIOENCODING: utf-8 | |
PYTHONUNBUFFERED: 1 | |
PIP_DISABLE_PIP_VERSION_CHECK: 1 | |
MAMBA_NO_BANNER: 1 | |
# our stuff | |
ATEST_RETRIES: 1 | |
CACHE_EPOCH: 4 | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-20.04 | |
env: | |
CI_LINTING: 1 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: cache (conda) | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda-${{ hashFiles('locks/lint-linux-64.conda.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
- name: setup conda (mambaforge) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/lint-linux-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: cache (yarn) | |
uses: actions/cache@v2 | |
with: | |
path: _scripts/.yarn-packages | |
key: | | |
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('_scripts/yarn.lock', '_scripts/.yarnrc') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}- | |
${{ env.CACHE_EPOCH }}-yarn- | |
- name: preflight (doit) | |
run: doit list --all --status | |
- name: lint | |
run: doit lint || doit lint || doit lint | |
- name: postmortem (doit) | |
if: always() | |
run: doit list --all --status | |
build-cpu-linux-64: | |
name: build cpu linux-64 | |
needs: [lint] | |
runs-on: ubuntu-20.04 | |
env: | |
CONSTRUCT_INPUTS: constructs/cpu-linux-64/* | |
BUILD_LOCKFILE: locks/build-linux-64.conda.lock | |
steps: | |
- uses: actions/checkout@v2 | |
- name: cache (dist) | |
uses: actions/cache@v2 | |
id: cache-dist | |
with: | |
path: dist | |
key: | | |
${{ env.CACHE_EPOCH }}-dist-${{ runner.os }}-${{ hashFiles(env.CONSTRUCT_INPUTS, env.BUILD_LOCKFILE) }} | |
- name: apt clean (ubuntu) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: | | |
set -eux | |
sudo bash .github/scripts/clean_ubuntu.sh | |
- name: cache (conda) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda-${{ hashFiles('locks/build-linux-64.conda.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
- name: setup conda (mambaforge) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/build-linux-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: preflight (disk space) | |
if: always() | |
run: df -h | |
- name: preflight (doit) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: doit list --all --status | |
- name: build (constructor) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: | | |
set -eux | |
doit build:cpu:linux-64:sha256 || doit build:cpu:linux-64:sha256 | |
- name: postmortem (doit) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: doit list --all --status | |
- name: publish (dist) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist-cpu-linux-64-${{ github.run_number }} | |
path: ./dist | |
- name: postmortem (disk space) | |
if: always() | |
run: df -h | |
smoke-cpu-linux-64: | |
name: smoke cpu linux-64 | |
needs: [build-cpu-linux-64] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: apt clean (ubuntu) | |
run: | | |
set -eux | |
sudo bash .github/scripts/clean_ubuntu.sh | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-cpu-linux-64-${{ github.run_number }} | |
path: ./dist | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: get unused port | |
run: | | |
echo "##[set-output name=unused;]$(python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()')" | |
id: port | |
- name: serve installer | |
run: | | |
cd dist | |
nohup python3 -m http.server ${{ steps.port.outputs.unused }} -b 127.0.0.1 & | |
sleep 5 | |
- name: setup conda (installer) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
installer-url: | | |
http://127.0.0.1:${{ steps.port.outputs.unused }}/GTCOARLab-CPU-2021.04.0-0-Linux-x86_64.sh | |
use-mamba: true | |
- name: list files in conda base | |
run: | | |
ls -lathr $CONDA | |
- name: list packages | |
run: | | |
mamba list -n base --explicit | |
- name: print post_install.log | |
run: | | |
cd $CONDA | |
cat post_install.log | |
test-cpu-linux-64: | |
name: test cpu linux-64 | |
needs: [build-cpu-linux-64] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: apt clean (ubuntu) | |
run: | | |
set -eux | |
sudo bash .github/scripts/clean_ubuntu.sh | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-cpu-linux-64-${{ github.run_number }} | |
path: ./dist | |
- name: cache (conda) | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda-${{ hashFiles('locks/atest-linux-64.conda.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
- name: setup conda (mambaforge) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/atest-linux-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: preflight (disk space) | |
if: always() | |
run: df -h | |
- name: test (robot) | |
run: | | |
doit -s test:cpu:linux-64 | |
- name: setup conda (mambaforge) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/audit-linux-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: audit (safety) | |
run: | | |
set -eux | |
mkdir -p ./build/audit | |
python _scripts/audit.py ./build/atest/cpu-linux-64-0 | |
- name: publish (atest and audit) | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: atest-cpu-linux-64-${{ github.run_number }} | |
path: | | |
./build/atest | |
./build/audit | |
- name: postmortem (disk space) | |
if: always() | |
run: df -h | |
build-cpu-osx-64: | |
name: build cpu osx-64 | |
needs: [lint] | |
runs-on: macos-latest | |
env: | |
CONSTRUCT_INPUTS: constructs/cpu-osx-64/* | |
BUILD_LOCKFILE: locks/build-osx-64.conda.lock | |
steps: | |
- uses: actions/checkout@v2 | |
- name: cache (dist) | |
uses: actions/cache@v2 | |
id: cache-dist | |
with: | |
path: dist | |
key: | | |
${{ env.CACHE_EPOCH }}-dist-${{ runner.os }}-${{ hashFiles(env.CONSTRUCT_INPUTS, env.BUILD_LOCKFILE) }} | |
- name: cache (conda) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-macos-latest-conda-${{ hashFiles('locks/build-osx-64.conda.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-macos-latest-conda- | |
${{ env.CACHE_EPOCH }}-macos-latest-conda- | |
- name: setup conda (mambaforge) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/build-osx-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: preflight (disk space) | |
if: always() | |
run: df -h | |
- name: preflight (doit) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: doit list --all --status | |
- name: build (constructor) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: | | |
set -eux | |
doit build:cpu:osx-64:sha256 || doit build:cpu:osx-64:sha256 | |
- name: postmortem (doit) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: doit list --all --status | |
- name: publish (dist) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist-cpu-osx-64-${{ github.run_number }} | |
path: ./dist | |
- name: postmortem (disk space) | |
if: always() | |
run: df -h | |
smoke-cpu-osx-64: | |
name: smoke cpu osx-64 | |
needs: [build-cpu-osx-64] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-cpu-osx-64-${{ github.run_number }} | |
path: ./dist | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: get unused port | |
run: | | |
echo "##[set-output name=unused;]$(python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()')" | |
id: port | |
- name: serve installer | |
run: | | |
cd dist | |
nohup python3 -m http.server ${{ steps.port.outputs.unused }} -b 127.0.0.1 & | |
sleep 5 | |
- name: setup conda (installer) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
installer-url: | | |
http://127.0.0.1:${{ steps.port.outputs.unused }}/GTCOARLab-CPU-2021.04.0-0-MacOSX-x86_64.sh | |
use-mamba: true | |
- name: list files in conda base | |
run: | | |
ls -lathr $CONDA | |
- name: list packages | |
run: | | |
mamba list -n base --explicit | |
- name: print post_install.log | |
run: | | |
cd $CONDA | |
cat post_install.log | |
test-cpu-osx-64: | |
name: test cpu osx-64 | |
needs: [build-cpu-osx-64] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-cpu-osx-64-${{ github.run_number }} | |
path: ./dist | |
- name: cache (conda) | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-macos-latest-conda-${{ hashFiles('locks/atest-osx-64.conda.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-macos-latest-conda- | |
${{ env.CACHE_EPOCH }}-macos-latest-conda- | |
- name: setup conda (mambaforge) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/atest-osx-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: preflight (disk space) | |
if: always() | |
run: df -h | |
- name: test (robot) | |
run: | | |
doit -s test:cpu:osx-64 | |
- name: setup conda (mambaforge) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/audit-osx-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: audit (safety) | |
run: | | |
set -eux | |
mkdir -p ./build/audit | |
python _scripts/audit.py ./build/atest/cpu-osx-64-0 | |
- name: publish (atest and audit) | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: atest-cpu-osx-64-${{ github.run_number }} | |
path: | | |
./build/atest | |
./build/audit | |
- name: postmortem (disk space) | |
if: always() | |
run: df -h | |
build-cpu-win-64: | |
name: build cpu win-64 | |
needs: [lint] | |
runs-on: windows-latest | |
env: | |
CONSTRUCT_INPUTS: constructs/cpu-win-64/* | |
BUILD_LOCKFILE: locks/build-win-64.conda.lock | |
steps: | |
- uses: actions/checkout@v2 | |
- name: cache (dist) | |
uses: actions/cache@v2 | |
id: cache-dist | |
with: | |
path: dist | |
key: | | |
${{ env.CACHE_EPOCH }}-dist-${{ runner.os }}-${{ hashFiles(env.CONSTRUCT_INPUTS, env.BUILD_LOCKFILE) }} | |
- name: enable long paths (windows) | |
shell: pwsh | |
run: | | |
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1 | |
- name: enable utf-8 console (windows) | |
shell: pwsh | |
run: | | |
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Nls\CodePage" -Name "ACP" -Type String -Value 65001 | |
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Nls\CodePage" -Name "OEMCP" -Type String -Value 65001 | |
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Nls\CodePage" -Name "MACCP" -Type String -Value 65001 | |
- name: cache (conda) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-windows-latest-conda-${{ hashFiles('locks/build-win-64.conda.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-windows-latest-conda- | |
${{ env.CACHE_EPOCH }}-windows-latest-conda- | |
- name: setup conda (mambaforge) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/build-win-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: preflight (disk space) | |
if: always() | |
run: df -h | |
- name: preflight (doit) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: doit list --all --status | |
- name: build (constructor) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: | | |
set -eux | |
doit build:cpu:win-64:sha256 || doit build:cpu:win-64:sha256 | |
- name: postmortem (doit) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: doit list --all --status | |
- name: publish (dist) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist-cpu-win-64-${{ github.run_number }} | |
path: ./dist | |
- name: postmortem (disk space) | |
if: always() | |
run: df -h | |
smoke-cpu-win-64: | |
name: smoke cpu win-64 | |
needs: [build-cpu-win-64] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: enable long paths (windows) | |
shell: pwsh | |
run: | | |
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1 | |
- name: enable utf-8 console (windows) | |
shell: pwsh | |
run: | | |
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Nls\CodePage" -Name "ACP" -Type String -Value 65001 | |
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Nls\CodePage" -Name "OEMCP" -Type String -Value 65001 | |
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Nls\CodePage" -Name "MACCP" -Type String -Value 65001 | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-cpu-win-64-${{ github.run_number }} | |
path: ./dist | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: get unused port | |
run: | | |
echo "##[set-output name=unused;]$(python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()')" | |
id: port | |
- name: serve installer | |
run: | | |
cd dist | |
nohup python3 -m http.server ${{ steps.port.outputs.unused }} -b 127.0.0.1 & | |
sleep 5 | |
- name: setup conda (installer) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
installer-url: | | |
http://127.0.0.1:${{ steps.port.outputs.unused }}/GTCOARLab-CPU-2021.04.0-0-Windows-x86_64.exe | |
use-mamba: true | |
- name: list files in conda base | |
run: | | |
ls -lathr $CONDA | |
- name: list packages | |
run: | | |
mamba list -n base --explicit | |
- name: print post_install.log | |
run: | | |
cd $CONDA | |
cat post_install.log | |
test-cpu-win-64: | |
name: test cpu win-64 | |
needs: [build-cpu-win-64] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: enable long paths (windows) | |
shell: pwsh | |
run: | | |
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1 | |
- name: enable utf-8 console (windows) | |
shell: pwsh | |
run: | | |
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Nls\CodePage" -Name "ACP" -Type String -Value 65001 | |
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Nls\CodePage" -Name "OEMCP" -Type String -Value 65001 | |
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Nls\CodePage" -Name "MACCP" -Type String -Value 65001 | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-cpu-win-64-${{ github.run_number }} | |
path: ./dist | |
- name: cache (conda) | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-windows-latest-conda-${{ hashFiles('locks/atest-win-64.conda.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-windows-latest-conda- | |
${{ env.CACHE_EPOCH }}-windows-latest-conda- | |
- name: setup conda (mambaforge) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/atest-win-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: preflight (disk space) | |
if: always() | |
run: df -h | |
- name: test (robot) | |
shell: cmd /C CALL {0} | |
env: | |
GTCL_INSTALL_DIR: c:\tmp | |
run: | | |
md c:\tmp | |
doit -s test:cpu:win-64 | |
- name: setup conda (mambaforge) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/audit-win-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: audit (safety) | |
run: | | |
set -eux | |
mkdir -p ./build/audit | |
python _scripts/audit.py ./build/atest/cpu-win-64-0 | |
- name: publish (atest and audit) | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: atest-cpu-win-64-${{ github.run_number }} | |
path: | | |
./build/atest | |
./build/audit | |
- name: postmortem (disk space) | |
if: always() | |
run: df -h | |
build-gpu-linux-64: | |
name: build gpu linux-64 | |
needs: [lint] | |
runs-on: ubuntu-20.04 | |
env: | |
CONSTRUCT_INPUTS: constructs/gpu-linux-64/* | |
BUILD_LOCKFILE: locks/build-linux-64.conda.lock | |
steps: | |
- uses: actions/checkout@v2 | |
- name: cache (dist) | |
uses: actions/cache@v2 | |
id: cache-dist | |
with: | |
path: dist | |
key: | | |
${{ env.CACHE_EPOCH }}-dist-${{ runner.os }}-${{ hashFiles(env.CONSTRUCT_INPUTS, env.BUILD_LOCKFILE) }} | |
- name: apt clean (ubuntu) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: | | |
set -eux | |
sudo bash .github/scripts/clean_ubuntu.sh | |
- name: cache (conda) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda-${{ hashFiles('locks/build-linux-64.conda.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
- name: setup conda (mambaforge) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/build-linux-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: clean cache (conda) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: | | |
set -eux | |
conda clean -yaf | |
- name: preflight (disk space) | |
if: always() | |
run: df -h | |
- name: preflight (doit) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: doit list --all --status | |
- name: build (constructor) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: | | |
set -eux | |
doit build:gpu:linux-64:sha256 || doit build:gpu:linux-64:sha256 | |
- name: postmortem (doit) | |
if: steps.cache-dist.outputs.cache-hit != 'true' | |
run: doit list --all --status | |
- name: publish (dist) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist-gpu-linux-64-${{ github.run_number }} | |
path: ./dist | |
- name: postmortem (disk space) | |
if: always() | |
run: df -h | |
smoke-gpu-linux-64: | |
name: smoke gpu linux-64 | |
needs: [build-gpu-linux-64] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: apt clean (ubuntu) | |
run: | | |
set -eux | |
sudo bash .github/scripts/clean_ubuntu.sh | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-gpu-linux-64-${{ github.run_number }} | |
path: ./dist | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: get unused port | |
run: | | |
echo "##[set-output name=unused;]$(python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()')" | |
id: port | |
- name: serve installer | |
run: | | |
cd dist | |
nohup python3 -m http.server ${{ steps.port.outputs.unused }} -b 127.0.0.1 & | |
sleep 5 | |
- name: setup conda (installer) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
installer-url: | | |
http://127.0.0.1:${{ steps.port.outputs.unused }}/GTCOARLab-GPU-2021.04.0-0-Linux-x86_64.sh | |
use-mamba: true | |
- name: list files in conda base | |
run: | | |
ls -lathr $CONDA | |
- name: list packages | |
run: | | |
mamba list -n base --explicit | |
- name: print post_install.log | |
run: | | |
cd $CONDA | |
cat post_install.log | |
test-gpu-linux-64: | |
name: test gpu linux-64 | |
needs: [build-gpu-linux-64] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: apt clean (ubuntu) | |
run: | | |
set -eux | |
sudo bash .github/scripts/clean_ubuntu.sh | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-gpu-linux-64-${{ github.run_number }} | |
path: ./dist | |
- name: cache (conda) | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda-${{ hashFiles('locks/atest-linux-64.conda.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
${{ env.CACHE_EPOCH }}-ubuntu-20.04-conda- | |
- name: setup conda (mambaforge) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/atest-linux-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: preflight (disk space) | |
if: always() | |
run: df -h | |
- name: test (robot) | |
run: | | |
doit -s test:gpu:linux-64 | |
- name: setup conda (mambaforge) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
condarc-file: .github/.condarc | |
environment-file: locks/audit-linux-64.conda.lock | |
miniforge-variant: Mambaforge | |
- name: audit (safety) | |
run: | | |
set -eux | |
mkdir -p ./build/audit | |
python _scripts/audit.py ./build/atest/gpu-linux-64-0 | |
- name: publish (atest and audit) | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: atest-gpu-linux-64-${{ github.run_number }} | |
path: | | |
./build/atest | |
./build/audit | |
- name: postmortem (disk space) | |
if: always() | |
run: df -h | |
draft-release: | |
name: release | |
needs: | |
- build-cpu-linux-64 | |
- build-cpu-osx-64 | |
- build-cpu-win-64 | |
- build-gpu-linux-64 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: get branch name | |
run: | | |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: info | |
- name: apt clean (ubuntu) | |
run: | | |
set -eux | |
sudo bash .github/scripts/clean_ubuntu.sh | |
- name: preflight (disk space) | |
if: always() | |
run: df -h | |
- name: download artifacts | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
path: artifacts | |
- name: dry-run release artifacts | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
env: | |
GIT_REF: ${{ github.ref }} | |
run: python _scripts/release.py | |
- name: release artifacts | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
env: | |
GIT_REF: ${{ github.ref }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: python _scripts/release.py | |
- name: postmortem (disk space) | |
if: always() | |
run: df -h |