Skip to content

Commit 9e7f40b

Browse files
authored
Merge pull request #29 from wx257osn2/update-ci
Update CI
2 parents 5f4bd08 + 6f80cb8 commit 9e7f40b

File tree

3 files changed

+34
-38
lines changed

3 files changed

+34
-38
lines changed

.github/workflows/linux.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,31 @@ on:
88

99
jobs:
1010
ci-ubuntu:
11-
runs-on: ubuntu-22.04
11+
strategy:
12+
matrix:
13+
os: [ubuntu-24.04, ubuntu-24.04-arm]
14+
compiler:
15+
- cc: gcc
16+
cxx: g++
17+
- cc: clang
18+
cxx: clang++
19+
runs-on: ${{ matrix.os }}
1220
steps:
13-
- name: install clang
14-
shell: bash
15-
run: |
16-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
17-
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" >> ./llvm.list
18-
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" >> ./llvm.list
19-
sudo mv llvm.list /etc/apt/sources.list.d
20-
sudo apt update -y
21-
sudo apt install clang-17 -y
21+
- uses: wx257osn2/cxx_environment@v2
22+
with:
23+
version: v20250216
2224
- uses: actions/checkout@v4
2325
with:
2426
submodules: recursive
2527
- uses: actions/cache@v4
28+
id: cached
2629
with:
27-
path: images
30+
path: |
31+
images
32+
qoi_test_images
2833
key: key
29-
- id: cached
30-
uses: andstor/file-existence-action@v3
31-
with:
32-
files: "images, qoi_test_images"
3334
- name: get test/benchmark suite
34-
if: steps.cached.outputs.files_exists == 'false'
35+
if: steps.cached.outputs.cache-hit != 'true'
3536
shell: bash
3637
run: |
3738
curl -O https://qoiformat.org/qoi_test_images.zip
@@ -44,12 +45,12 @@ jobs:
4445
pushd .dependencies/qoi
4546
ln -s ../stb/stb_image.h .
4647
ln -s ../stb/stb_image_write.h .
47-
make conv
48+
cxx-env-run make conv CC:=${{ matrix.compiler.cc }}
4849
popd
4950
mv .dependencies/qoi/qoiconv bin/qoiconv_orig
5051
- name: build
5152
shell: bash
52-
run: CXX=clang++-17 make -j
53+
run: cxx-env-run make -j CXX:=${{ matrix.compiler.cxx }}
5354
- name: test
5455
shell: bash
5556
run: |

.github/workflows/mac.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,20 @@ on:
88

99
jobs:
1010
ci-mac:
11-
runs-on: macos-14
11+
runs-on: macos-15
1212
steps:
13-
- name: install clang
14-
shell: bash
15-
run: brew install llvm@17
1613
- uses: actions/checkout@v4
1714
with:
1815
submodules: recursive
1916
- uses: actions/cache@v4
17+
id: cached
2018
with:
21-
path: images
19+
path: |
20+
images
21+
qoi_test_images
2222
key: key
23-
- id: cached
24-
uses: andstor/file-existence-action@v3
25-
with:
26-
files: "images, qoi_test_images"
2723
- name: get test/benchmark suite
28-
if: steps.cached.outputs.files_exists == 'false'
24+
if: steps.cached.outputs.cache-hit != 'true'
2925
shell: bash
3026
run: |
3127
curl -O https://qoiformat.org/qoi_test_images.zip
@@ -38,12 +34,12 @@ jobs:
3834
pushd .dependencies/qoi
3935
ln -s ../stb/stb_image.h .
4036
ln -s ../stb/stb_image_write.h .
41-
make conv
37+
CC=$(brew --prefix llvm@18)/bin/clang make conv
4238
popd
4339
mv .dependencies/qoi/qoiconv bin/qoiconv_orig
4440
- name: build
4541
shell: bash
46-
run: CXX=$(brew --prefix llvm@17)/bin/clang++ make -j
42+
run: CXX=$(brew --prefix llvm@18)/bin/clang++ make -j
4743
- name: test
4844
shell: bash
4945
run: |

.github/workflows/windows.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: windows-2022
11+
runs-on: windows-2025
1212
steps:
1313
- uses: msys2/setup-msys2@v2
1414
with:
@@ -25,15 +25,14 @@ jobs:
2525
with:
2626
submodules: recursive
2727
- uses: actions/cache@v4
28+
id: cached
2829
with:
29-
path: images
30+
path: |
31+
images
32+
qoi_test_images
3033
key: key
31-
- id: cached
32-
uses: andstor/file-existence-action@v3
33-
with:
34-
files: "images, qoi_test_images"
3534
- name: get test/benchmark suite
36-
if: steps.cached.outputs.files_exists == 'false'
35+
if: steps.cached.outputs.cache-hit != 'true'
3736
shell: msys2 {0}
3837
run: |
3938
curl -O https://qoiformat.org/qoi_test_images.zip
@@ -46,7 +45,7 @@ jobs:
4645
pushd .dependencies/qoi
4746
ln -s ../stb/stb_image.h .
4847
ln -s ../stb/stb_image_write.h .
49-
mingw32-make conv
48+
CC=clang mingw32-make conv
5049
popd
5150
mv .dependencies/qoi/qoiconv.exe bin/qoiconv_orig.exe
5251
- name: build

0 commit comments

Comments
 (0)