-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (85 loc) · 2.74 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
ci-ubuntu:
runs-on: ubuntu-22.04
steps:
- name: install clang-17
shell: bash
run: |
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 libc++-17-dev libc++abi-17-dev libunwind-17-dev -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: 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=cc
export CXX="cxx -stdlib=libc++"
make -j
- 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