1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- name: CI
- on:
- workflow_call:
- env:
- CGO_LDFLAGS_ALLOW: "-s|-w"
- jobs:
- test:
- runs-on: ubuntu-latest
- container:
- image: ghcr.io/imgproxy/imgproxy-ci:202410292002
- strategy:
- matrix:
- go-version: ["1.23.x", "1.22.x", "1.21.x"]
- vips-version: ["8.16", "8.15", "8.14"]
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - uses: actions/setup-go@v5
- with:
- go-version: ${{ matrix.go-version }}
- - name: Download mods
- run: go mod download
- - name: Test
- run: go test ./...
- env:
- LD_LIBRARY_PATH: "/usr/local/lib:/root/vips/${{ matrix.vips-version }}/lib"
- PKG_CONFIG_PATH: "/usr/local/lib/pkgconfig:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"
- lint:
- runs-on: ubuntu-latest
- container:
- image: ghcr.io/imgproxy/imgproxy-ci:202410292002
- strategy:
- matrix:
- go-version: ["1.23.x"]
- vips-version: ["8.16"]
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - uses: actions/setup-go@v5
- with:
- go-version: ${{ matrix.go-version }}
- - name: Download mods
- run: go mod download
- - name: Lint
- uses: golangci/golangci-lint-action@v7
- with:
- version: v2.1.6
- args: --timeout 10m0s
- env:
- LD_LIBRARY_PATH: "/usr/local/lib:/root/vips/${{ matrix.vips-version }}/lib"
- PKG_CONFIG_PATH: "/usr/local/lib/pkgconfig:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"
- c-lint:
- runs-on: ubuntu-24.04
- steps:
- - uses: actions/checkout@v4
- - uses: cpp-linter/cpp-linter-action@v2
- id: linter
- with:
- style: file
- version: 18 # Ubuntu 24.04 provides clang-format-18
- tidy-checks: '-*' # disable clang-tidy
- - name: Fail fast
- continue-on-error: true # TODO: remove this line in the future
- if: steps.linter.outputs.checks-failed > 0
- run: exit 1
|