Files
concrete/.github/workflows/conformance.yml
Andi Drebes e356b8f797 fix(ci): Conformance test: Abort on failure in any command in the run section
By default, all commands in the `run` section of
`.github/workflows/conformance.yml` are executed, regardless of their
return values and the return value of the last command is used as the
result for the entire flow. Failing test followed by passing tests
thus remain undetected.

This change forces the use of the bash shell and causes it to exit
immediately with a non-zero return value when one of the commands
fails using `set -e`.
2021-11-12 15:05:55 +01:00

45 lines
1.2 KiB
YAML

name: Conformance
on:
push:
branches: [master, test-ci]
pull_request:
types: [opened, synchronize, reopened]
jobs:
Formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Format with clang-format
run: .github/workflows/scripts/format_cpp.sh
BuildAndTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Build and test compiler
uses: addnab/docker-run-action@v3
with:
registry: ghcr.io
image: ghcr.io/zama-ai/zamalang-compiler:latest
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
options: -v ${{ github.workspace }}/compiler:/compiler
shell: bash
run: |
set -e
echo "Debug: ccache statistics (prior to the build):"
ccache -s
cd /compiler
pip install pytest
rm -rf /build
export PYTHONPATH=""
make CCACHE=ON BUILD_DIR=/build test
echo "Debug: ccache statistics (after the build):"
ccache -s