GPU CI Fix (Pin runs-on GPU image) #87
Workflow file for this run
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
name: "tests" | |
on: [push, pull_request, workflow_dispatch] | |
concurrency: | |
group: build-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
cpu-ci: | |
name: CPU unit tests and build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Git Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Free additional space on runner | |
run: ./.github/workflows/helpers/free_space_on_runner.sh | |
- name: Install nix | |
uses: cachix/install-nix-action@v25 | |
with: | |
github_access_token: '${{ secrets.GITHUB_TOKEN }}' | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: ff | |
skipPush: true | |
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: setup nix develop shell | |
uses: nicknovitski/nix-develop@v1.1.0 | |
env: | |
NIXPKGS_ALLOW_UNFREE: 1 | |
with: | |
arguments: ".#ci --accept-flake-config" | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1.2 | |
- name: Regenerate all dtgen files | |
run: | | |
proj dtgen --force | |
- name: Run cmake | |
run: | | |
proj cmake --dtgen-skip | |
- name: Run build and tests | |
run: | | |
proj test --dtgen-skip -j$(nproc) --coverage --skip-gpu-tests | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: main_coverage.info | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
verbose: true | |
gpu-ci: | |
name: GPU unit tests | |
needs: cpu-ci | |
runs-on: | |
- runs-on | |
- family=g4dn.xlarge | |
- image=runs-on-gpu-pinned | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
steps: | |
- name: checkout git repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: mount ephemeral drive to nix | |
run: | | |
sudo mkdir $HOME/_work/nix && sudo mkdir /nix && sudo mount --bind $HOME/_work/nix /nix | |
- name: install nix | |
uses: cachix/install-nix-action@v25 | |
with: | |
github_access_token: '${{ secrets.GITHUB_TOKEN }}' | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: ff | |
skipPush: true | |
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: setup nix develop shell | |
uses: nicknovitski/nix-develop@v1.1.0 | |
env: | |
NIXPKGS_ALLOW_UNFREE: 1 | |
with: | |
arguments: ".#gpu-ci --accept-flake-config --impure" | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1.2 | |
- name: regenerate all dtgen files | |
run: | | |
proj dtgen --force | |
- name: run cmake | |
run: | | |
proj cmake --dtgen-skip | |
- name: build and run gpu tests | |
run: | | |
proj test --dtgen-skip -j$(nproc) --skip-build-cpu-tests |