Advent of code 2023: Day 1 & 2 (#265) #531
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
debug: | |
name: debug-${{matrix.config.image}}-${{matrix.config.arch}}-${{matrix.config.compiler}} | |
runs-on: ${{matrix.config.image}} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
image: ubuntu-20.04, | |
arch: x86_64, | |
os: ubuntu, | |
compiler: clang10, | |
cc: clang-10, | |
cxx: clang++-10 | |
} | |
- { | |
image: windows-2019, | |
arch: x86_64, | |
os: windows, | |
compiler: vs2019, | |
generator: vs2019 | |
} | |
env: | |
CC: ${{matrix.config.cc}} | |
CXX: ${{matrix.config.cxx}} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: install-unix | |
if: matrix.config.os != 'windows' | |
run: | | |
echo "Installing llvm-10"; sudo apt install llvm-10 | |
sudo ln -s /usr/bin/llvm-cov-10 /usr/bin/llvm-cov | |
sudo ln -s /usr/bin/llvm-profdata-10 /usr/bin/llvm-profdata | |
- name: configure-unix | |
if: matrix.config.os != 'windows' | |
run: ./scripts/configure.sh --type Debug --sanitize --coverage --tests --fuzz --lint | |
- name: configure-windows | |
if: matrix.config.os == 'windows' | |
run: pwsh .\scripts\configure.ps1 -Gen ${{matrix.config.generator}} -Type Debug -Tests | |
- name: build-unix | |
if: matrix.config.os != 'windows' | |
run: ./scripts/build.sh | |
- name: build-windows | |
if: matrix.config.os == 'windows' | |
run: pwsh .\scripts\build.ps1 | |
- name: test-unix | |
if: matrix.config.os != 'windows' | |
run: ./scripts/test.sh | |
- name: test-windows | |
if: matrix.config.os == 'windows' | |
run: pwsh .\scripts\test.ps1 | |
- name: fuzz-corpus-cache | |
if: matrix.config.os != 'windows' | |
uses: actions/cache@v2 | |
with: | |
path: ./fuzz/corpus | |
key: fuzz-corpus | |
- name: fuzz-lex | |
if: matrix.config.os != 'windows' | |
run: ./scripts/fuzz.sh --path bin/novfuzz-lex --duration 60 | |
- name: fuzz-parse | |
if: matrix.config.os != 'windows' | |
run: ./scripts/fuzz.sh --path bin/novfuzz-parse --duration 60 | |
- name: upload-coverage | |
if: matrix.config.os != 'windows' | |
env: | |
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} | |
run: ./scripts/upload_coverage.sh --token "${CODECOV_TOKEN}" | |
release: | |
name: release-${{matrix.config.image}}-${{matrix.config.arch}}-${{matrix.config.compiler}} | |
runs-on: ${{matrix.config.image}} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
image: ubuntu-20.04, | |
arch: x86_64, | |
os: ubuntu, | |
compiler: gcc9, | |
cc: gcc-9, | |
cxx: g++-9 | |
} | |
- { | |
image: ubuntu-20.04, | |
arch: x86_64, | |
os: ubuntu, | |
compiler: clang10, | |
cc: clang-10, | |
cxx: clang++-10 | |
} | |
- { | |
image: macos-11, | |
arch: x86_64, | |
os: macos, | |
compiler: appleclang, | |
cc: clang, | |
cxx: clang++ | |
} | |
- { | |
image: windows-2019, | |
arch: x86_64, | |
os: windows, | |
compiler: mingw-w64-7, | |
generator: MinGW, | |
cc: 'C:\ProgramData\Chocolatey\bin\gcc.exe', | |
cxx: 'C:\ProgramData\Chocolatey\bin\g++.exe' | |
} | |
- { | |
image: windows-2019, | |
arch: x86_64, | |
os: windows, | |
compiler: vs2019, | |
generator: vs2019 | |
} | |
- { | |
image: windows-2019, | |
arch: x86_64, | |
os: windows, | |
compiler: vs2019-clang, | |
generator: vs2019-clang | |
} | |
env: | |
CC: ${{matrix.config.cc}} | |
CXX: ${{matrix.config.cxx}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install-windows-mingw | |
if: matrix.config.os == 'windows' && matrix.config.generator == 'MinGW' | |
run: | | |
echo "Installing mingw-w64-7" | |
choco install mingw --version=7.3.0 --force | |
echo "where g++.exe:"; where.exe g++.exe | |
echo "g++.exe --version:"; g++.exe --version | |
- name: configure-unix | |
if: matrix.config.os != 'windows' | |
run: ./scripts/configure.sh --type Release --tests | |
- name: configure-windows | |
if: matrix.config.os == 'windows' | |
run: pwsh .\scripts\configure.ps1 -Gen ${{matrix.config.generator}} -Type Release -Tests | |
- name: build-unix | |
if: matrix.config.os != 'windows' | |
run: ./scripts/build.sh | |
- name: build-windows | |
if: matrix.config.os == 'windows' | |
run: pwsh .\scripts\build.ps1 | |
- name: test-unix | |
if: matrix.config.os != 'windows' | |
run: ./scripts/test.sh | |
- name: test-windows | |
if: matrix.config.os == 'windows' | |
run: pwsh .\scripts\test.ps1 | |
- name: archive | |
uses: actions/upload-artifact@v2 | |
with: | |
name: novus-release-${{matrix.config.image}}-${{matrix.config.arch}}-${{matrix.config.compiler}} | |
path: bin |