Skip to content

Merge pull request #17 from larskanis/stdrb #97

Merge pull request #17 from larskanis/stdrb

Merge pull request #17 from larskanis/stdrb #97

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
job_test_gem:
name: Test in source tree
strategy:
fail-fast: false
matrix:
include:
- os: windows
ruby: 'head'
- os: ubuntu
ruby: 'head'
- os: ubuntu
ruby: '3.2'
- os: ubuntu
ruby: '2.6'
- os: macos
ruby: 'head'
- os: windows
ruby: 'head'
builtin: 'true'
- os: ubuntu
ruby: '2.6'
builtin: 'true'
- os: macos
ruby: 'head'
builtin: 'true'
env:
libzint_version: 2.12.0
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }} # passed to ruby/setup-ruby
apt-get: 'libpng-dev' # Ubuntu
brew: 'cmake libpng qt5' # macOS
- name: Ubuntu build zint
if: matrix.os == 'ubuntu' && matrix.builtin != 'true'
run: |
wget https://github.com/zint/zint/archive/refs/tags/$libzint_version.zip
unzip $libzint_version.zip
cd zint-$libzint_version
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
- name: macOS build zint
if: matrix.os == 'macos' && matrix.builtin != 'true'
run: |
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
wget https://github.com/zint/zint/archive/refs/tags/$libzint_version.zip
unzip $libzint_version.zip
cd zint-$libzint_version
mkdir build
cd build
cmake ..
make
sudo make install
- name: Windows install zint
if: matrix.os == 'windows' && matrix.builtin != 'true'
run: |
wget https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-zint-$env:libzint_version-1-any.pkg.tar.zst
pacman -U --noconfirm ./mingw-w64-ucrt-x86_64-zint-$env:libzint_version-1-any.pkg.tar.zst
- name: Print tool versions
run: |
ruby -v
gem env
- name: Bundle install
run: bundle install
- name: Compile builtin zint
if: matrix.builtin == 'true'
run: bundle exec rake compile -- --disable-system-libzint
- name: Run tests
run: bundle exec rake spec
- uses: joshmfrankel/simplecov-check-action@main
if: matrix.os == 'ubuntu' && matrix.ruby == 'head'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
standardrb:
runs-on: ubuntu-latest
steps:
- name: standardrb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: amoeba/standardrb-action@v4