Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wx257osn2 committed Feb 6, 2024
1 parent d3b200e commit 7a02d95
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 31 deletions.
16 changes: 0 additions & 16 deletions .github/actions/cache_cargo/action.yaml

This file was deleted.

31 changes: 20 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,30 @@ jobs:
ci:
runs-on: ubuntu-22.04
steps:
- name: install gcc-12
- name: install clang-17
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@v2
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" >> ./llvm.list
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" >> ./llvm.list
sudo mv llvm.list /etc/apt/sources.list.d
sudo apt update -y
sudo apt install clang-17 -y
sudo update-alternatives --install /usr/local/bin/clang clang /usr/bin/clang-17 17
sudo update-alternatives --install /usr/local/bin/clang++ clang++ /usr/bin/clang++-17 17
sudo update-alternatives --install /usr/local/bin/cc cc /usr/local/bin/clang 10
sudo update-alternatives --install /usr/local/bin/cxx cxx /usr/local/bin/clang++ 10
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/actions/cache_cargo
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/cache@v2
- 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@v1
uses: andstor/file-existence-action@v3
with:
files: images
- name: get benchmark suite
Expand All @@ -36,7 +42,10 @@ jobs:
run: curl https://qoiformat.org/benchmark/qoi_benchmark_suite.tar | tar x
- name: build
shell: bash
run: make -j
run: |
export CC=cc
export CXX=cxx
make -j
- name: run
shell: bash
run: benchmark/bin/qoibench 10 images --threads=0
7 changes: 3 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ jobs:
fmt_lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/actions/cache_cargo
- uses: actions-rs/toolchain@v1
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: run
shell: bash
Expand Down

0 comments on commit 7a02d95

Please sign in to comment.