update CI #19
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: install gcc-12 | |
shell: bash | |
run: | | |
sudo apt-get install -y gcc-12 g++-12 | |
sudo update-alternatives --install /usr/local/bin/gcc gcc /usr/bin/gcc-12 12 --slave /usr/local/bin/g++ g++ /usr/bin/g++-12 | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: Swatinem/rust-cache@v2 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/cache@v4 | |
with: | |
path: images | |
key: key | |
- id: cached | |
uses: andstor/file-existence-action@v3 | |
with: | |
files: images | |
- name: get benchmark suite | |
if: steps.cached.outputs.files_exists == 'false' | |
shell: bash | |
run: curl https://qoiformat.org/benchmark/qoi_benchmark_suite.tar | tar x | |
- name: build | |
shell: bash | |
run: make -j | |
- name: run | |
shell: bash | |
run: benchmark/bin/qoibench 10 images --threads=0 |