Get TagLib 2.0.1 working #151
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- '**.txt' | |
- 'docs/**' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '**.txt' | |
- 'docs/**' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
ruby: [2.7, 3.2] | |
runs-on: ${{ matrix.os }} | |
env: | |
MAKEFLAGS: -j2 | |
PLATFORM: x86_64-linux | |
TAGLIB_VERSION: 2.0.1 | |
SWIG_DIR: .swig-v4.1.1 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Cache SWIG v4.1.1 | |
id: cache-swig | |
uses: actions/cache@v2 | |
with: | |
path: ~/${{ env.SWIG_DIR }} | |
key: swig-${{ matrix.os }}-v4.1.1 | |
- name: Install SWIG v4.1.1 | |
if: steps.cache-swig.outputs.cache-hit != 'true' | |
run: | | |
sudo apt install yodl | |
git clone --depth 1 --branch v4.1.1 https://github.com/swig/swig.git | |
cd swig | |
./autogen.sh | |
./configure --prefix=$HOME/$SWIG_DIR --with-ruby=$(which ruby) --without-alllang | |
make && make install | |
- name: Bundle Install | |
run: | | |
gem install bundler -v 2.4.22 | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Cache TagLib (C++) | |
id: cache-taglib | |
uses: actions/cache@v2 | |
with: | |
path: | | |
tmp/${{ env.PLATFORM }}/taglib-${{ env.TAGLIB_VERSION }} | |
tmp/taglib-${{ env.TAGLIB_VERSION }}.tar.gz | |
key: taglib-${{ matrix.os }}-v${{ env.TAGLIB_VERSION }}-cache.v3 | |
- name: Install TagLib (C++) | |
if: steps.cache-taglib.outputs.cache-hit != 'true' | |
run: bundle exec rake vendor | |
- name: Generate SWIG Wrappers | |
run: | | |
touch ext/*/*.i | |
export PATH=$HOME/$SWIG_DIR/bin:$PATH | |
TAGLIB_DIR=$PWD/tmp/$PLATFORM/taglib-$TAGLIB_VERSION bundle exec rake swig | |
echo 'Checking for changes (there should be none)' | |
git diff --exit-code | |
- name: Compile (taglib-ruby) | |
run: TAGLIB_DIR=$PWD/tmp/$PLATFORM/taglib-$TAGLIB_VERSION bundle exec rake compile | |
- name: Run Tests (taglib-ruby) | |
run: LD_LIBRARY_PATH=$PWD/tmp/$PLATFORM/taglib-$TAGLIB_VERSION/lib bundle exec rake test |