From a6c0946e2dfeb2b2e8091a271cee83ea4ccb7ae5 Mon Sep 17 00:00:00 2001 From: I <1091761+wx257osn2@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:41:08 +0900 Subject: [PATCH] add M1 mac CI --- .github/workflows/ci.yaml | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9f4f9c9..ce0c9f3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ on: branches: [ master ] jobs: - ci: + ci-ubuntu: runs-on: ubuntu-22.04 steps: - name: install clang-17 @@ -49,3 +49,39 @@ jobs: - name: run shell: bash run: benchmark/bin/qoibench 10 images --threads=0 + ci-mac: + runs-on: macos-14 + steps: + - name: install clang-17 + shell: bash + run: brew install llvm@17 + - 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: | + export CC=$(brew --prefix llvm@17)/bin/clang + export CXX=$(brew --prefix llvm@17)/bin/clang++ + mkdir bin + ln -s $(brew --prefix llvm@17)/bin/clang bin/cc + ln -s $(brew --prefix llvm@17)/bin/clang++ bin/cxx + export PATH="$(realpath bin):${PATH}" + make -j + - name: run + shell: bash + run: benchmark/bin/qoibench 10 images --threads=0