update ci #8
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: Build | |
on: push | |
jobs: | |
test: | |
name: "Build" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: ['3.0', '3.1', '3.2', '3.3'] | |
libwebp: ['0.4.4', '1.0.2', '1.4.0'] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: ${{ matrix.ruby }} | |
- name: Prepare libwebp ${{ matrix.libwebp }} | |
run: | | |
./spec/build.sh | |
env: | |
LIBWEBP_VERSION: ${{ matrix.libwebp }} | |
- name: Set envs | |
run: | | |
echo "LD_FLAGS=-L$HOME/opt/lib" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$HOME/opt/lib" >> $GITHUB_ENV | |
echo "CPATH=$CPATH:$HOME/opt/include" >> $GITHUB_ENV | |
- name: Build package | |
run: | | |
bundle exec rake compile | |
- name: Test package | |
run: | | |
bundle exec rake spec | |