Skip to content

Update README.md

Update README.md #1475

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
tags:
- 'v[0-9]*.[0-9]*.[0-9]*'
pull_request:
branches:
- "main"
- "release/*"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
format-check:
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:x86_64
steps:
- uses: actions/checkout@v4
- name: configure
run: |
meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=disabled \
-Dzlib=disabled \
-Dlz4=disabled \
-Dlzma=disabled \
-Dzstd=disabled \
-Dthreads=disabled \
-Dfuse-old=disabled \
-Dtest=false \
-Ddoc=false
- name: muon fmt
run: |
if ! find . \( -name meson.build -or -name meson_options.txt \) -print0 \
| xargs -0 muon fmt -q; then
find . \( -name meson.build -or -name meson_options.txt \) -print0 \
| xargs -0 muon fmt -i;
git diff
exit 1
fi
- name: clang-format
run: |
ninja -C /tmp/build clang-format-check
test:
needs:
- format-check
strategy:
matrix:
arch:
#- i386
- x86_64
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:${{ matrix.arch }}
options: --privileged
steps:
- uses: actions/checkout@v4
- name: configure
run: |
CC=gcc meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=enabled \
-Dzlib=enabled \
-Dlz4=enabled \
-Dlzma=enabled \
-Dzstd=enabled \
-Dthreads=enabled \
-Dfuse-old=enabled \
-Dtest=extended \
-Ddoc=false
- name: test
run: |
ninja -C /tmp/build test
fuzzer:
needs:
- format-check
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:x86_64
volumes:
- /tmp/build:/tmp/build
steps:
- uses: actions/checkout@v4
- name: configure
run: |
CC=clang meson setup /tmp/build \
-Dwerror=true \
-Dexamples=false \
-Dcurl=enabled \
-Dzlib=enabled \
-Dlz4=enabled \
-Dlzma=enabled \
-Dzstd=enabled \
-Dthreads=enabled \
-Dtest=false \
-Dfuzzer=true \
-Ddoc=false
- name: fuzzer
run: |
ninja -C /tmp/build test
- name: Upload Failing Inputs
uses: actions/upload-artifact@v4
if: failure()
with:
name: failing-inputs
path: /tmp/build/fuzzer/inputs
build:
needs:
- format-check
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:${{ matrix.arch }}
strategy:
matrix:
cc:
- gcc
- clang
feature:
- enabled
- disabled
arch:
#- i386
- x86_64
steps:
- uses: actions/checkout@v4
- name: configure
run: |
meson wrap update-db
CC=${{ matrix.cc }} meson setup /tmp/build \
-Dwerror=false \
-Dexamples=true \
-Dcurl=${{ matrix.feature }} \
-Dzlib=${{ matrix.feature }} \
-Dlz4=${{ matrix.feature }} \
-Dlzma=${{ matrix.feature }} \
-Dzstd=${{ matrix.feature }} \
-Dfuse-old=${{ matrix.feature }} \
-Dtest=false \
-Ddoc=false
- name: build
run: |
ninja -C /tmp/build
build-linux32:
needs:
- format-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt update
sudo apt install --yes meson build-essential gcc-multilib g++-multilib
- name: configure
env:
CROSS_FILE: |
[binaries]
c = 'gcc'
cpp = 'g++'
ar = 'gcc-ar'
strip = 'strip'
[built-in options]
c_args = ['-m32']
c_link_args = ['-m32']
cpp_args = ['-m32']
cpp_link_args = ['-m32']
[host_machine]
system = 'linux'
cpu_family = 'x86'
cpu = 'i686'
endian = 'little'
run: |
echo "$CROSS_FILE" > cross-file.txt
meson setup --cross-file cross-file.txt /tmp/build \
-Dwerror=false \
-Dexamples=true \
-Dtest=false \
-Ddoc=false
- name: build
run: |
ninja -C /tmp/build
build-openbsd:
needs:
- format-check
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
strategy:
matrix:
arch:
- x86_64
- arm64
steps:
- uses: actions/checkout@v4
- uses: "cross-platform-actions/[email protected]"
with:
operating_system: openbsd
architecture: ${{ matrix.arch }}
version: 7.5
run: |
sudo pkg_add git meson squashfs-tools curl lz4 xz zstd
CC=clang meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=enabled \
-Dzlib=enabled \
-Dlz4=enabled \
-Dlzma=enabled \
-Dzstd=enabled \
-Dfuse-old=enabled \
-Dfuse=disabled \
-Dtest=extended \
-Ddoc=false
# fuse needs root privileges on OpenBSD
sudo meson test -C /tmp/build -t 5
build-mac:
needs:
- format-check
runs-on: macos-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- run: |
brew install git meson squashfs lz4 xz zstd macfuse
- run: |
meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=disabled \
-Dzlib=enabled \
-Dlz4=enabled \
-Dlzma=enabled \
-Dzstd=enabled \
-Dfuse-old=enabled \
-Dfuse=disabled \
-Dtest=extended \
-Ddoc=false
- run: |
meson test -C /tmp/build -t 5
doxygen:
needs:
- build
- test
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: configure
run: |
git config --global --add safe.directory $PWD
CC=clang meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=disabled \
-Dzlib=disabled \
-Dlz4=disabled\
-Dlzma=disabled \
-Dzstd=disabled \
-Dtest=false \
-Ddoc=true
- name: generate
run: |
meson compile -C /tmp/build doc
- name: deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref_type == 'tag' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: /tmp/build/doc/html
destination_dir: doxygen
release:
needs:
- test
- fuzzer
- build
- build-linux32
- doxygen
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:latest
volumes:
- /tmp/build:/tmp/build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: configure
run: |
git config --global --add safe.directory $PWD
meson setup /tmp/build \
-Dtest=true
- name: dist
run: |
meson dist -C /tmp/build \
--formats gztar,xztar \
--include-subprojects
- name: Create Artifact
uses: actions/upload-artifact@v4
with:
name: tarball
path: /tmp/build/meson-dist/*
- name: check-version
if: ${{ github.ref_type == 'tag' }}
run: |
git tag --points-at > /tmp/tags.txt
meson introspect --projectinfo /tmp/build \
| jq -r '"v" + .version' > /tmp/version.txt
if ! diff /tmp/version.txt /tmp/tags.txt; then
echo "Version mismatch"
exit 1
fi
- name: Create Release Draft
uses: softprops/action-gh-release@v2
if: ${{ github.ref_type == 'tag' }}
with:
draft: true
make_latest: true
generate_release_notes: true
github_token: ${{ secrets.GITHUB_TOKEN }}
files: /tmp/build/meson-dist/*