cleanup #355
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 and test | |
on: | |
push: | |
branches: main | |
paths: | |
- 'Makefile' | |
- '*.bash' | |
- 'src/**/*' | |
- '.github/**/*.yaml' | |
jobs: | |
build-and-test: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
fast: [0, 1] | |
llvm: [18] | |
name: "fast: ${{ matrix.fast }}, llvm: ${{ matrix.llvm }}" | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: trust LLVM apt repositories | |
run: wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc | |
- name: add LLVM apt repositories | |
run: | | |
sudo add-apt-repository --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.llvm }} main" | |
sudo add-apt-repository --yes "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.llvm }} main" | |
- name: install llvm | |
run: | | |
sudo apt update --yes | |
sudo apt install --yes \ | |
clang-${{ matrix.llvm }} \ | |
libc++-${{ matrix.llvm }}-dev \ | |
libc++abi-${{ matrix.llvm }}-dev \ | |
lld-${{ matrix.llvm }} | |
- name: checkout solutions | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: checkout inputs and answers | |
uses: actions/checkout@v4 | |
with: | |
repository: matiaslindgren/advent-of-code-data | |
token: ${{ secrets.READ_AOC_DATA_2024 }} | |
path: txt | |
- name: build all | |
run: make LLVM_VERSION=${{ matrix.llvm }} FAST=${{ matrix.fast }} --jobs $(getconf _NPROCESSORS_ONLN) | |
- name: dump sysinfo | |
run: make LLVM_VERSION=${{ matrix.llvm }} FAST=${{ matrix.fast }} run_tools/sysinfo | |
- name: test utils | |
run: make LLVM_VERSION=${{ matrix.llvm }} FAST=${{ matrix.fast }} test_utils | |
- name: test md5 | |
run: LLVM_VERSION=${{ matrix.llvm }} FAST=${{ matrix.fast }} ./scripts/test_md5.bash | |
- name: test all solutions | |
run: make LLVM_VERSION=${{ matrix.llvm }} FAST=${{ matrix.fast }} test_verbose |