npc,ci: add npc to nix packages
Some checks failed
Run CTests within npc / npc-test (flow) (push) Failing after 8s
Build abstract machine with nix / build-packages (abstract-machine) (push) Failing after 14s
Build abstract machine with nix / build-packages (nemu) (push) Successful in 41s
Build abstract machine with nix / build-packages (nemu-lib) (push) Successful in 9s
Build abstract machine with nix / build-packages (rv32Cross.abstract-machine) (push) Successful in 8s
Run CTests within npc / npc-test (flow-simlib) (push) Failing after 7s

This commit is contained in:
xinyangli 2024-08-14 17:01:37 +08:00
parent 8ee1551dc2
commit 64aee9ae21
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
12 changed files with 423 additions and 157 deletions

View file

@ -8,20 +8,21 @@ on:
- master
jobs:
build-abstract-machine:
build-packages:
runs-on: nix
strategy:
matrix:
package:
- "abstract-machine"
- "nemu"
- "nemu-lib"
- "rv32Cross.abstract-machine"
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: Build abstract-machine
- name: Build package
run: |
nix build .?submodules=1#abstract-machine
- name: Build nemu
run: |
nix build .?submodules=1#nemu
nix build -L .#${{ matrix.package }}

View file

@ -0,0 +1,18 @@
name: Run CTests within npc
on: [push]
jobs:
npc-test:
strategy:
matrix:
package: [ "flow", "flow-simlib"]
runs-on: nix
steps:
- uses: https://github.com/cachix/cachix-action@v14
with:
name: ysyx
authToken: '${{ secrets.CACHIX_SIGNING_KEY }}'
- uses: actions/checkout@v4
- name: Build package
run: |
nix build -L .#${{ matrix.package }}

View file

@ -1,51 +0,0 @@
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
/nix/var/nix/db
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