-
Notifications
You must be signed in to change notification settings - Fork 19
42 lines (39 loc) · 1.31 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: ci
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test
strategy:
matrix:
libwebp-version: ['1.3.0', '1.3.1']
go-version: ['~1.18', '~1.19', '~1.20']
extldflags: ['', '-static']
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/cache
key: "1-${{ runner.os }}-${{ matrix.libwebp-version }}"
- name: setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: set environment variables
shell: bash
run: |
mkdir -p $HOME/cache
echo "CGO_CFLAGS=-I $HOME/cache/libwebp-${{ matrix.libwebp-version }}/include" >> $GITHUB_ENV
echo "CGO_LDFLAGS=-L $HOME/cache/libwebp-${{ matrix.libwebp-version }}/lib" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/cache/libwebp-${{ matrix.libwebp-version }}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "GOLIBWEBP_EXTLDFLAGS=${{ matrix.extldflags }}" >> $GITHUB_ENV
- name: build libwebp
run: LIBWEBP_PREFIX=$HOME/cache/libwebp-${{ matrix.libwebp-version }} make libwebp
- name: test
run: make test