Skip to content

release: Bump version in CMakeLists and CHANGELOG #142

release: Bump version in CMakeLists and CHANGELOG

release: Bump version in CMakeLists and CHANGELOG #142

Workflow file for this run

name: vatomic tests and verification
on:
- push
- pull_request
env:
REGISTRY: ghcr.io
jobs:
changed:
name: Detect changed files
runs-on: ubuntu-latest
outputs:
workflows: ${{ steps.workflows.outputs.changed }}
include: ${{ steps.include.outputs.changed }}
verify: ${{ steps.verify.outputs.changed }}
test: ${{ steps.test.outputs.changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dorny/paths-filter@v3
id: include
with:
filters: |
changed:
- 'include/**'
- uses: dorny/paths-filter@v3
id: workflows
with:
filters: |
changed:
- '.github/**'
- uses: dorny/paths-filter@v3
id: verify
with:
filters: |
changed:
- 'verify/**.bpl'
- 'verify/**.rs'
- 'verify/**.sh'
- 'verify/**.txt'
- uses: dorny/paths-filter@v3
id: test
with:
filters: |
changed:
- 'test/**'
test-install:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure vatomic
run: cmake -S. -Bbuild -DCMAKE_INSTALL_PREFIX=/tmp/target
- name: Install library
run: cmake --install build
- name: Configure test project
run: cmake -Stest/project -Bbuild2 -DCMAKE_PREFIX_PATH=/tmp/target
- name: Build test project
run: cmake --build build2
test-native:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prep Env for macos
if: matrix.os == 'macos-latest'
run: |
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
- name: Configure Testing Ubuntu
run: |
cmake -S. -Bbuild
if: matrix.os != 'macos-latest'
- name: Configure Testing Mac
run: |
export SDK_ROOT=$(xcrun --sdk macosx --show-sdk-path)
cmake -S. -Bbuild -DCMAKE_C_FLAGS="-isysroot $SDK_ROOT" -DCMAKE_CXX_FLAGS="-isysroot $SDK_ROOT"
if: matrix.os == 'macos-latest'
- name: Build Tests
run: cmake --build build
- name: Run Tests
run: ctest --test-dir build --output-on-failure
test-netbsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure, Build, Install
id: test
uses: vmactions/netbsd-vm@v1
with:
release: "10.1"
usesh: true
prepare: /usr/sbin/pkg_add curl cmake
run: |
set -eux
rm -rf /tmp/target
cmake -S. -Bbuild -DCMAKE_INSTALL_PREFIX=/tmp/target
cmake --build build
ctest --test-dir build --output-on-failure
cmake --install build
cmake -Stest/project -Bbuild2 -DCMAKE_PREFIX_PATH=/tmp/target
cmake --build build2
check-expectations:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target:
- clang-format-apply
- cmake-format-apply
- markdown
- vatomic-generate
- vatomic-test-generate
steps:
- name: Download and Install doxygen & mdox for markdown check
if: matrix.target == 'markdown'
run: |
sudo apt update && sudo apt install -y doxygen curl
sudo curl -L -o /usr/local/bin/mdox https://github.com/db7/mdox/releases/download/v0.1/mdox-v0.1-linux-amd64
sudo chmod +x /usr/local/bin/mdox
- name: Install cmake-format for cmake-format-check
if: matrix.target == 'cmake-format-apply'
run: pip install cmakelang
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure
run: cmake -S. -Bbuild
- name: Run ${{ matrix.target }}
run: cmake --build build --target ${{ matrix.target }}
- name: Check things match expectation
run: cmake --build build --target diff-check ||
(echo "Run 'make ${{ matrix.target }}' and commit" && false)
test-qemu-other:
needs: changed
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.test == 'true') }}
strategy:
matrix:
optimization_level: [ "O1", "O2", "O3" ]
toolchain: [ "x86_64", "riscv" ]
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository }}/qemu-ci:latest
steps:
- name: Check out to run with the tests
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure
run: cmake -S . -Bbuild
-DCMAKE_TOOLCHAIN_FILE=".github/toolchains/${{ matrix.toolchain }}.cmake"
-DCMAKE_C_FLAGS="-${{ matrix.optimization_level }} ${{ matrix.flags }}"
-DVATOMIC_DEV=OFF
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
test-qemu-arm32:
needs: changed
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.test == 'true') }}
strategy:
matrix:
optimization_level: [ "O1", "O2", "O3" ]
toolchain: [ "armel", "armel8", "armeb", "armeb8" ]
flags: [ "-DVSYNC_BUILTINS=ON", "-DVSYNC_BUILTINS=OFF" ]
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository }}/qemu-ci:latest
steps:
- name: Check out to run with the tests
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure
run: cmake -S . -Bbuild
-DCMAKE_TOOLCHAIN_FILE=".github/toolchains/${{ matrix.toolchain }}.cmake"
-DCMAKE_C_FLAGS="-${{ matrix.optimization_level }} ${{ matrix.flags }}"
-DVATOMIC_DEV=OFF
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
test-qemu-arm64:
needs: changed
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.test == 'true') }}
strategy:
matrix:
optimization_level: [ "O1", "O2", "O3" ]
options:
- toolchain: "arm64"
flags: ""
- toolchain: "arm64_lse"
flags: "-DVATOMIC_ENABLE_ARM64_LXE=ON"
- toolchain: "arm64_lse"
flags: "-DVATOMIC_ENABLE_ARM64_LXE=OFF"
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository }}/qemu-ci:latest
steps:
- name: Check out to run with the tests
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure
run: cmake -S . -Bbuild
-DCMAKE_TOOLCHAIN_FILE=".github/toolchains/${{ matrix.options.toolchain }}.cmake"
-DCMAKE_C_FLAGS="-${{ matrix.optimization_level }} ${{ matrix.options.flags }}"
-DVATOMIC_DEV=OFF
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
verify-armv8:
needs: changed
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.verify == 'true') }}
strategy:
matrix:
target: [ builtin, llsc, lse, lxe ]
group: [ vatomic8, vatomic16, vatomic32, vatomic64, vatomicsz, vatomicptr, vatomic_fence ]
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository }}/boogie-ci:latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure
run: cmake -S. -Bbuild -DVATOMIC_DEV=OFF
- name: Build
run: cmake --build build --target build_boogie_armv8_${{ matrix.target }}_${{ matrix.group }}
- name: Verify
run: ctest -j 4 -L armv8_${{ matrix.target }}_${{ matrix.group }} --test-dir build/verify
verify-riscv:
needs: changed
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.verify == 'true') }}
strategy:
matrix:
group: [ vatomic8, vatomic16, vatomic32, vatomic64, vatomicsz, vatomicptr, vatomic_fence ]
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository }}/boogie-ci:latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure
run: cmake -S. -Bbuild -DVATOMIC_DEV=OFF
- name: Build
run: cmake --build build --target build_boogie_riscv_builtin_${{ matrix.group }}
- name: Verify
run: ctest -j 4 -L riscv_builtin_${{ matrix.group }} --test-dir build/verify