Skip to content

fix deploy

fix deploy #235

Workflow file for this run

name: Tests
on:
push:
branches:
- "*"
pull_request:
branches:
- master
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
check:
runs-on: ubuntu-latest
outputs:
deploy: ${{ steps.git.outputs.deploy }}
steps:
- uses: actions/checkout@v3
- name: Install Python3
run: |
sudo apt install -y python3
- id: git
name: Check Commit Message
run: |
git clone https://github.com/antony-jr/QArchive qarc
cd qarc
git tag > /tmp/tags.txt
cd ..
rm -rf qarc
cat /tmp/tags.txt
result=$(python3 scripts/check.py "$(git log -1 --pretty=%B)" "/tmp/tags.txt")
echo "deploy=$result" >> $GITHUB_OUTPUT
ubuntu:
needs: check
if: needs.check.outputs.deploy == 'false'
runs-on: ubuntu-${{ matrix.ubuntu_version }}
name: Ubuntu-${{ matrix.ubuntu_version }}-Qt-${{ matrix.qt_version }}-shared-${{ matrix.shared }}
strategy:
fail-fast: false
matrix:
ubuntu_version: [20.04, 22.04]
qt_version: [5.9.9, 5.15.2, 6.4.0]
shared: [ON, OFF]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
cache: 'true'
cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }}
dir: ${{ github.workspace }}/Qt
- name: Install LibArchive
run: |
mkdir build
cd build
git clone https://github.com/libarchive/libarchive
cd libarchive
git checkout "v3.5.1"
cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" .
cmake --build . --config ${{env.BUILD_TYPE}}
sudo make install
cd ..
rm -rf libarchive
cd ..
sudo cp -fp /usr/local/lib/pkgconfig/libarchive.pc /usr/lib/pkgconfig/libarchive.pc
sudo cp -fp /usr/local/lib/libarchive.* /usr/lib/
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DBUILD_SHARED_LIBS=${{ matrix.shared }} -DBUILD_TESTS=ON -B "${{github.workspace}}/build"
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Run tests
working-directory: ${{github.workspace}}/build/tests
run: "ctest --verbose"
macos:
needs: check
if: needs.check.outputs.deploy == 'false'
runs-on: macos-${{ matrix.macos_version }}
name: macos-${{ matrix.macos_version }}-Qt6-${{ matrix.qt6 }}-${{ matrix.shared }}
strategy:
fail-fast: false
matrix:
macos_version: [12]
qt6: ['enabled', 'disabled']
shared: ['shared', 'static']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: brew install meson ninja qt6 qt5
- name: Configure Meson
run: meson setup "${{github.workspace}}/build" -Ddefault_library=${{matrix.shared}} -Dqt6=${{matrix.qt6}} -Dpkg_config_path=/usr/local/opt/qt@5/lib/pkgconfig
- name: Build
run: meson compile -C "${{github.workspace}}/build" --verbose
- name: Run tests
run: meson test -C "${{github.workspace}}/build" --verbose
MSYS2:
needs: check
if: needs.check.outputs.deploy == 'false'
runs-on: windows-latest
name: MSYS2-${{matrix.platform}}
strategy:
matrix:
deps: ['enabled', 'disabled']
platform: ['MINGW64', 'UCRT64', 'CLANG64']
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.platform}}
pacboy: >-
cc:p
libarchive:p
meson:p
ninja:p
pkgconf:p
qt5-base:p
qt6-base:p
- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dauto_features=${{matrix.deps}} -Dwarning_level=3 -Dcpp_std=c++20
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
Ubuntu-meson:
needs: check
if: needs.check.outputs.deploy == 'false'
runs-on: ubuntu-20.04
name: Linux-GCC${{matrix.cxx}}
strategy:
matrix:
cxx: ['7', '13']
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-gcc@v1
with:
version: ${{matrix.cxx}}
- name: Install meson
run: |
python3 -m pip install meson ninja
sudo apt install -y libarchive-dev qtbase5-dev
- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
Ubuntu-meson-clang:
needs: check
if: needs.check.outputs.deploy == 'false'
runs-on: ubuntu-20.04
name: Linux-Clang${{matrix.cxx}}
strategy:
matrix:
cxx: ['7', '17']
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-clang@v1
with:
version: ${{matrix.cxx}}
- name: Install meson
run: |
python3 -m pip install meson ninja
sudo apt install -y libarchive-dev qtbase5-dev
- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose