This commit is contained in:
parent
6f7d7ba383
commit
5451854c9c
7 changed files with 148 additions and 12 deletions
49
.gitea/workflows/npc-test.yml
Normal file
49
.gitea/workflows/npc-test.yml
Normal file
|
@ -0,0 +1,49 @@
|
|||
name: Run CTests within npc
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
npc-test:
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: https://github.com/cachix/cachix-action@v14
|
||||
with:
|
||||
name: ysyx
|
||||
authToken: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache develop environment
|
||||
id: cache-nix-develop
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /nix/store
|
||||
key: nix-develop-${{ hashFiles('flake.*') }}
|
||||
- name: Fetch nix store
|
||||
if: steps.cache-nix-develop.outputs.cache-hit != 'true'
|
||||
run: nix develop .#npc --command true
|
||||
- name: Use develop environment
|
||||
uses: https://git.xinyang.life/xin/nix-develop@main
|
||||
with:
|
||||
arguments: .#npc
|
||||
- name: Cache sbt dependencies
|
||||
id: cache-sbt-dependency
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
npc/core
|
||||
~/.cache/coursier
|
||||
~/.ivy2/cache
|
||||
~/.sbt
|
||||
key: core-${{ hashFiles('npc/core/build.sbt') }}
|
||||
- name: Fetch sbt dependencies
|
||||
if: steps.cache-sbt-dependency.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd npc/core
|
||||
sbt update
|
||||
- name: Run difftests
|
||||
run: |
|
||||
mkdir -p npc/build
|
||||
cd npc/build
|
||||
cmake $cmakeFlags ../
|
||||
make -j8
|
||||
ctest -V
|
Loading…
Add table
Add a link
Reference in a new issue