Skip to content

Merge pull request #40 from johncohn/feature/substeps-flag #75

Merge pull request #40 from johncohn/feature/substeps-flag

Merge pull request #40 from johncohn/feature/substeps-flag #75

Workflow file for this run

name: CI
on:
push:
branches:
- trunk
pull_request:
branches:
- trunk
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
# NO CGO, on any platform, Linux included. Ebitengine is pure Go there on
# the v2.10 alpha this project pins — which is exactly why it pins that
# alpha. Setting it at the job level is the enforcement: a dependency that
# quietly needed a C toolchain fails here instead of on somebody's machine.
env:
CGO_ENABLED: "0"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Test
run: go test ./...
cross-build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: windows
goarch: amd64
- goos: windows
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
# The browser build behind the GitHub Pages demo, so a change that
# breaks it fails here instead of at deploy time.
- goos: js
goarch: wasm
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build ${{ matrix.goos }}/${{ matrix.goarch }}
env:
CGO_ENABLED: "0"
GOARCH: ${{ matrix.goarch }}
GOOS: ${{ matrix.goos }}
run: go build -trimpath -ldflags="-s -w" ./...