on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
release:
types: [ published ]
schedule:
- cron: '0 0 * * *'
name: bindings-go
env:
GO_VERSION: 1.25.x
jobs:
lint:
permissions:
contents: read
pull-requests: read
checks: write runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: build libpathrs
run: make release
- name: install libpathrs
run: sudo ./install.sh --libdir=/usr/lib
- uses: golangci/golangci-lint-action@v9
with:
version: v2.5
working-directory: go-pathrs
go-fix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- uses: dtolnay/rust-toolchain@stable
- name: build libpathrs
run: make release
- name: install libpathrs
run: sudo ./install.sh --libdir=/usr/lib
- uses: actions/setup-go@v6
with:
go-version: "${{ env.GO_VERSION }}"
- name: run go fix
run: |
cd go-pathrs
go fix ./...
git diff --exit-code
smoke-test:
strategy:
fail-fast: false
matrix:
go-version:
- "1.18"
- "oldstable"
- "stable"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: build libpathrs
run: make release
- name: install libpathrs
run: sudo ./install.sh --libdir=/usr/lib
- name: install go ${{ matrix.go-version }}
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- run: make -C examples/go smoke-test
go-complete:
needs:
- lint
- go-fix
- smoke-test
runs-on: ubuntu-latest
steps:
- run: echo "Go CI jobs completed successfully."