diff --git a/.github/workflows/c.yml b/.github/workflows/c.yml index 882aff3d0..6e7efe01b 100644 --- a/.github/workflows/c.yml +++ b/.github/workflows/c.yml @@ -7,40 +7,21 @@ on: branches: [ develop ] env: - SDL: 1 - JIT: 1 ICARUS: 1 CTEST_OUTPUT_ON_FAILURE: 1 + LIGHTNING_VERSION: 2.2.3 jobs: - coverage: - runs-on: ubuntu-latest - steps: - - name: Set up Homebrew - id: set-up-homebrew - uses: Homebrew/actions/setup-homebrew@master - - run: brew install bison expect icarus-verilog lcov - - if: env.SDL != 0 - run: brew install sdl2 sdl2_image - - uses: actions/checkout@v3 - with: - submodules: true - - run: | - ./scripts/build-lightning.sh 2.1.3 $HOME/local - echo "C_INCLUDE_PATH=$HOME/local/include" >> $GITHUB_ENV - echo "LIBRARY_PATH=$HOME/local/lib" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/local/lib" >> $GITHUB_ENV - - name: make coverage - run: unbuffer make coverage - timeout-minutes: 10 - - uses: codecov/codecov-action@v2 - build: strategy: matrix: - os: - - ubuntu-latest - - macos-latest + include: + - os: ubuntu-latest + JIT: 1 + SDL: 0 # "webp" is failing to be loaded in CI + - os: macos-latest + JIT: 0 # GNU Lightning is throwing Bus Error + SDL: 1 runs-on: ${{ matrix.os }} steps: - name: Set up Homebrew @@ -49,23 +30,26 @@ jobs: - run: brew upgrade || true # Avoid failures due to incomplete links. - run: brew install bison expect icarus-verilog - if: runner.os == 'macOS' - run: echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH - - if: env.SDL != 0 + run: echo "$(brew --prefix)/opt/bison/bin" >> $GITHUB_PATH + - if: matrix.SDL != 0 run: | brew install sdl2 sdl2_image - uses: actions/checkout@v3 with: submodules: true - - if: env.JIT != 0 + - if: matrix.JIT != 0 run: | - ./scripts/build-lightning.sh 2.1.3 $HOME/local + ./scripts/build-lightning.sh $LIGHTNING_VERSION $HOME/local echo "C_INCLUDE_PATH=$HOME/local/include" >> $GITHUB_ENV echo "LIBRARY_PATH=$HOME/local/lib" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/local/lib" >> $GITHUB_ENV - name: make run: make -j timeout-minutes: 5 - - uses: actions/upload-artifact@v2 + env: + JIT: ${{ matrix.JIT }} + SDL: ${{ matrix.SDL }} + - uses: actions/upload-artifact@v4 with: path: build/ name: builddir-${{ matrix.os }} diff --git a/hw/verilog/sim/simtop.v b/hw/verilog/sim/simtop.v index f8117b1ca..c6d3f6b82 100644 --- a/hw/verilog/sim/simtop.v +++ b/hw/verilog/sim/simtop.v @@ -31,7 +31,7 @@ module Top(); $write("\n"); end end - $finish; + $finish(0); end endtask @@ -49,7 +49,7 @@ module Top(); $tenyr_load(filename, failure); // replace with $readmemh ? if (failure) begin $display("Could not load file %0s", filename); - $stop; + $stop(0); end end if ($value$plusargs("PERIODS=%d", temp))