Skip to content

Commit

Permalink
ci: Run tests in the debug build (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuta authored Nov 7, 2021
1 parent f56b1dc commit 52b15db
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: CI
on:
push:
branches: "*"
pull_request:
branches: "*"

jobs:
build_and_test:
Expand All @@ -13,18 +11,31 @@ jobs:
fail-fast: false
matrix:
include:
# Release builds.
- os: ubuntu-20.04
build_options: RELEASE=1

# Debug builds.
- os: ubuntu-20.04
build_options:
steps:
- uses: actions/checkout@v2

- name: Cache files
uses: actions/cache@v2
with:
path: |
~/.cargo
target
build
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Docker
run: docker ps

- name: Set up Rust
run: |
rustup override set nightly
Expand All @@ -34,7 +45,7 @@ jobs:
run: cargo install cargo-binutils rustfilt

- name: Build Kerla
run: make RELEASE=1
run: make ${{ matrix.build_options }}

- name: Lint
run: make strict-lint
Expand All @@ -43,12 +54,12 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y qemu-system

- name: Run unit tests
run: make test RELEASE=1
run: make test ${{ matrix.build_options }}

- name: Run integration tests
run: >
make run
RELEASE=1
${{ matrix.build_options }}
INIT_SCRIPT="TESTS_DIR=/integration_tests /integration_tests/run.sh; halt -f"
DISABLE_AUTO_CR_PRINT=1
| tee run.log
Expand Down

0 comments on commit 52b15db

Please sign in to comment.