| 1 |
name: CI |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: |
| 5 |
- main |
| 6 |
tags: |
| 7 |
- "*" |
| 8 |
pull_request: |
| 9 |
workflow_dispatch: |
| 10 |
|
| 11 |
jobs: |
| 12 |
build: |
| 13 |
runs-on: ${{ matrix.os }} |
| 14 |
strategy: |
| 15 |
fail-fast: false |
| 16 |
matrix: |
| 17 |
os: |
| 18 |
- macos-13 |
| 19 |
- macos-14 |
| 20 |
- ubuntu-22.04 |
| 21 |
- windows-2022 |
| 22 |
steps: |
| 23 |
- uses: actions/checkout@v4 |
| 24 |
|
| 25 |
- uses: actions/setup-go@v5 |
| 26 |
with: |
| 27 |
go-version-file: go.work |
| 28 |
cache-dependency-path: "**/go.sum" |
| 29 |
|
| 30 |
- name: run tests and lints |
| 31 |
run: go run ./build check |
| 32 |
|
| 33 |
test-bsd: |
| 34 |
runs-on: ubuntu-latest |
| 35 |
|
| 36 |
steps: |
| 37 |
- uses: actions/checkout@v4 |
| 38 |
- uses: actions/setup-go@v5 |
| 39 |
with: |
| 40 |
go-version-file: go.work |
| 41 |
|
| 42 |
- name: Build |
| 43 |
run: go test -c ./... |
| 44 |
env: |
| 45 |
GOOS: freebsd |
| 46 |
|
| 47 |
- name: Test |
| 48 |
uses: cross-platform-actions/[email protected] |
| 49 |
with: |
| 50 |
operating_system: freebsd |
| 51 |
version: "14.0" |
| 52 |
shell: bash |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
run: ./allocator.test -test.v -test.short |
| 58 |
sync_files: runner-to-vm |