refactor document tree #1165
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: build_test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/ccache | |
CCACHE_MAXSIZE: 500M | |
CCACHE_KEY_SUFFIX: r20 | |
jobs: | |
build: | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { os: ubuntu-22.04, compiler: clang, cc: clang-15, cxx: clang++-15 } | |
- { os: ubuntu-22.04, compiler: gcc, cc: gcc-13, cxx: g++-13 } | |
- { os: macos-12, compiler: clang, cc: clang, cxx: clang++ } | |
- { os: windows-2019, compiler: msvc } | |
steps: | |
- name: ubuntu install ccache | |
if: startsWith(matrix.config.os, 'ubuntu') | |
run: | | |
sudo apt install ccache | |
ccache -V | |
- name: macos install ccache | |
if: startsWith(matrix.config.os, 'macos') | |
run: | | |
brew install ccache | |
ccache -V | |
- name: set up python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: install python dependencies | |
run: pip install --upgrade pip conan==1.* | |
- name: cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.ccache | |
/Users/runner/Library/Caches/ccache | |
~/.conan/data | |
C:/.conan | |
C:/Users/runneradmin/.conan/data | |
key: ${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ env.CCACHE_KEY_SUFFIX }} | |
restore-keys: | | |
${{ matrix.config.os }}-${{ matrix.config.compiler }}- | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: cmake | |
env: | |
CC: ${{ matrix.config.cc }} | |
CXX: ${{ matrix.config.cxx }} | |
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
- name: build | |
run: cmake --build build --config Release # `config Release` somehow necessary for windows | |
- name: upload binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: bin-${{ matrix.config.os }}-${{ matrix.config.compiler }} | |
path: | | |
build/test/odr_test | |
test: | |
needs: build | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
config: | |
- { os: ubuntu-22.04, bin: bin-ubuntu-22.04-clang } | |
- { os: macos-12, bin: bin-macos-12-clang } | |
steps: | |
- name: ubuntu install tidy | |
if: startsWith(matrix.config.os, 'ubuntu') | |
run: sudo apt install tidy | |
- name: macos install tidy | |
if: startsWith(matrix.config.os, 'macos') | |
run: brew install tidy-html5 | |
- name: set up python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.PAT_ANDIWAND }} | |
submodules: true | |
- run: pip install -r test/scripts/requirements.txt | |
- name: download binaries | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ matrix.config.bin }} | |
path: build/test | |
- name: fix artifact permissions | |
run: chmod +x build/test/odr_test | |
- name: test | |
working-directory: build/test | |
run: ./odr_test | |
- name: tidy public test outputs | |
run: python3 -u test/scripts/tidy_output.py build/test/output/odr-public/output | |
- name: compare public test outputs | |
run: python3 -u test/scripts/compare_output.py --driver firefox --max-workers 1 test/data/reference-output/odr-public/output build/test/output/odr-public/output | |
- name: tidy private test outputs | |
run: python3 -u test/scripts/tidy_output.py build/test/output/odr-private/output | |
- name: compare private test outputs | |
run: python3 -u test/scripts/compare_output.py --driver firefox --max-workers 1 test/data/reference-output/odr-private/output build/test/output/odr-private/output |