Fix test_format.cpp #1116
Workflow file for this run
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: Exotic architectures | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
build_job: | |
runs-on: ubuntu-24.04 | |
name: Build on ${{ matrix.target.arch }} / ${{ matrix.config.name }} / date-polyfill ${{ matrix.target.date-polyfill}} | |
strategy: | |
matrix: | |
target: | |
# - { arch: armv7, date-polyfill: 'ON' } | |
- { arch: aarch64, date-polyfill: 'ON' } | |
- { arch: aarch64, date-polyfill: 'OFF'} | |
- { arch: riscv64, date-polyfill: 'ON' } | |
- { arch: s390x, date-polyfill: 'ON' } | |
- { arch: s390x, date-polyfill: 'OFF' } | |
- { arch: ppc64le, date-polyfill: 'ON' } | |
- { arch: ppc64le, date-polyfill: 'OFF' } | |
config: | |
- { name: Debug } | |
- { name: Release } | |
steps: | |
- name: Install binfmt-support | |
run: | | |
sudo apt-get update | |
sudo apt-get install binfmt-support | |
- name: Get current date | |
id: date | |
uses: Kaven-Universe/github-action-current-date-time@v1 | |
with: | |
format: "YYYY-MM-DD_HH-mm-ss-SSS" | |
- name: Cache builds | |
uses: actions/cache@v4 | |
with: | |
key: ${{matrix.target.arch}}_${{matrix.config.name}}_${{matrix.target.date-polyfill}}_ccache-${{ steps.date.outputs.time }} | |
path: ${{ github.workspace }}/.ccache | |
restore-keys: | | |
${{matrix.target.arch}}_${{matrix.config.name}}_${{matrix.target.date-polyfill}}_ccache- | |
- name: Set up Alpine Linux for ${{ matrix.target.arch }} | |
uses: jirutka/setup-alpine@v1 | |
id: alpine-target | |
with: | |
branch: v3.20 | |
arch: ${{ matrix.target.arch }} | |
packages: > | |
ccache | |
cmake | |
date-dev | |
doctest-dev | |
g++ | |
git | |
linux-headers | |
make | |
musl-dev | |
samurai | |
tzdata | |
shell-name: alpine.sh | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configuring sparrow | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
run: cmake -G Ninja -Bbuild | |
-DCMAKE_BUILD_TYPE:STRING=${{matrix.config.name}} | |
-DUSE_DATE_POLYFILL=${{matrix.target.date-polyfill}} | |
-DBUILD_TESTS:BOOL=ON | |
-DBUILD_EXAMPLES:BOOL=ON | |
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache | |
-B build | |
shell: alpine.sh {0} | |
- name: Building sparrow library | |
run: cmake --build build --config ${{matrix.config.name}} --target sparrow | |
shell: alpine.sh {0} | |
- name: Building sparrow tests | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
run: cmake --build build --config ${{matrix.config.name}} --target test_sparrow_lib | |
shell: alpine.sh {0} | |
- name: Running sparrow examples | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
run: cmake --build build --config ${{matrix.config.name}} --target run_examples | |
shell: alpine.sh {0} | |
- name: Running sparrow tests | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
run: cmake --build build --config ${{matrix.config.name}} --target run_tests_with_junit_report | |
shell: alpine.sh {0} | |
- name: CCache stat | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
run: ccache --show-stats | |
shell: alpine.sh {0} | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: test_sparrow_lib_report_Linux_${{matrix.target.arch}}_${{matrix.config.name}}_date-polyfill_${{matrix.target.date-polyfill}} | |
path: ./**/test*.xml | |
if-no-files-found: error |