add script #383
Workflow file for this run
This file contains hidden or 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: CI-PR | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- macos-15 | |
- macos-14 | |
- macos-13 | |
- ubuntu-22.04 | |
- ubuntu-22.04-arm | |
- ubuntu-24.04 | |
- ubuntu-24.04-arm | |
- windows-2019 | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup MingW64 | |
if: startsWith(matrix.platform, 'windows') | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: mingw64 | |
install: >- | |
mingw-w64-x86_64-gcc | |
- name: Setup go compiler | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
check-latest: true | |
cache: false | |
- name: Setup zig | |
if: matrix.platform == 'ubuntu-22.04' | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: 0.11.0 | |
- name: Test | |
run: go run mage.go test | |
- name: Codecov | |
if: matrix.platform == 'ubuntu-22.04' | |
uses: codecov/codecov-action@v5 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Test arm32 | |
if: matrix.platform == 'ubuntu-22.04' | |
run: go run mage.go buildx machbase-neo linux arm |