Fedora CI #313
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Fedora CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 10 * * 1' | |
jobs: | |
build: | |
name: Fedora | |
strategy: | |
fail-fast: false | |
matrix: | |
# Fedora release targets | |
release: [36, 37, 38, rawhide] | |
runs-on: ubuntu-latest | |
container: | |
image: registry.fedoraproject.org/fedora:${{matrix.release}} | |
options: --security-opt seccomp=unconfined | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Copr support and make | |
run: dnf install dnf-plugins-core make -y | |
- name: Enable AUFOVER copr repositories | |
run: | | |
dnf copr enable -y @aufover/divine | |
dnf copr enable -y @aufover/predator | |
if [[ "${{matrix.release}}" =~ 36 ]]; then | |
dnf copr enable -y @aufover/symbiotic | |
fi | |
- name: Update the system and install dependencies | |
run: | | |
dnf config-manager --set-enabled updates-testing | |
dnf config-manager --set-enabled updates-testing-modular | |
dnf update -y | |
DNF_OPTS=-y make install-deps | |
- name: Check that all expected tools are present and working | |
run: | | |
make configure | |
for tool in cbmc cppcheck divine predator; do | |
grep TOOL_ENABLE_${tool} workdir/CMakeCache.txt | |
done | |
# benchmark requires CLANG 14+ and GCC 12+ | |
case "${{matrix.release}}" in | |
36) | |
grep TOOL_ENABLE_symbiotic workdir/CMakeCache.txt | |
;; | |
37) | |
grep TOOL_ENABLE_clang workdir/CMakeCache.txt | |
;; | |
*) | |
grep TOOL_ENABLE_clang workdir/CMakeCache.txt | |
grep TOOL_ENABLE_gcc workdir/CMakeCache.txt | |
;; | |
esac | |
# first run only cheap tests, so that we can report failures sooner | |
- name: Cheap tests | |
run: CTEST_OPTS='-LE EXPENSIVE' make check | |
- name: Test single-c/sync.sh script | |
run: | | |
SYNC_EXISTING_ONLY=1 tests/single-c/sync.sh -LE EXPENSIVE | |
CTEST_OPTS='-LE EXPENSIVE' make check | |
- name: Expensive tests | |
run: CTEST_OPTS='-L EXPENSIVE' make check | |
# try to use source directory as a working directory | |
- name: In-source tests | |
run: | | |
cd tests | |
cmake . | |
ctest -j$(nproc) --output-on-failure -LE EXPENSIVE | |
# logs are useful only when something fails | |
- name: Upload Artifact | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: fedora-${{matrix.release}} | |
path: workdir/ | |
retention-days: 14 |