Skip to content

Update CI

Update CI #79

Workflow file for this run

name: Ubuntu
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
ci-ubuntu:
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
compiler:
- cc: gcc
cxx: g++
- cc: clang
cxx: clang++
runs-on: ${{ matrix.os }}
steps:
- uses: wx257osn2/cxx_environment@v2
with:
version: v20250216
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
id: cached
with:
path: |
images
qoi_test_images
key: key
- name: get test/benchmark suite
if: steps.cached.outputs.cache-hit != 'true'
shell: bash
run: |
curl -O https://qoiformat.org/qoi_test_images.zip
unzip qoi_test_images.zip
rm qoi_test_images.zip
curl https://qoiformat.org/benchmark/qoi_benchmark_suite.tar | tar x
- name: build reference qoiconv
shell: bash
run: |
pushd .dependencies/qoi
ln -s ../stb/stb_image.h .
ln -s ../stb/stb_image_write.h .
cxx-env-run make conv CC:=${{ matrix.compiler.cc }}
popd
mv .dependencies/qoi/qoiconv bin/qoiconv_orig
- name: build
shell: bash
run: cxx-env-run make -j CXX:=${{ matrix.compiler.cxx }}
- name: test
shell: bash
run: |
pushd qoi_test_images
mkdir -p /tmp/qoixx
mkdir -p /tmp/qoi
for i in ./*.qoi; do
# test decode
../bin/qoiconv ${i} /tmp/qoixx/${i%.*}.png
../bin/qoiconv_orig ${i} /tmp/qoi/${i%.*}.png
diff /tmp/qoi{,xx}/${i%.*}.png
done
rm -rf /tmp/qoixx/*.png
rm -rf /tmp/qoi/*.png
for i in ./*.png; do
# test encode
../bin/qoiconv ${i} /tmp/qoixx/${i%.*}.qoi
../bin/qoiconv_orig /tmp/qoixx/${i%.*}.qoi /tmp/qoixx/${i}
../bin/qoiconv_orig ${i} /tmp/qoi/${i%.*}.qoi
../bin/qoiconv_orig /tmp/qoi/${i%.*}.qoi /tmp/qoi/${i}
diff /tmp/qoi{,xx}/${i}
done
popd
bin/test
- name: run
shell: bash
run: bin/qoibench 1 images --noreference --nowarmup