-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f03a9e6
commit 54950ba
Showing
2 changed files
with
12 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,11 @@ | ||
name: build | ||
on: [push, pull_request] | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go-version: [~1.19, ^1] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
GO111MODULE: "on" | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download Go modules | ||
run: go mod download | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
pull_request: | ||
|
||
- name: Build examples | ||
run: | | ||
go mod tidy | ||
go build -v ./... | ||
working-directory: ./examples | ||
|
||
- name: Test | ||
run: go test ./... | ||
|
||
test-goos: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
cache: true | ||
# https://go.dev/doc/install/source#environment | ||
- run: GOOS=darwin GOARCH=amd64 go test -c -v ./... | ||
- run: GOOS=darwin GOARCH=arm64 go test -c -v ./... | ||
- run: GOOS=linux GOARCH=386 go test -c -v ./... | ||
- run: GOOS=linux GOARCH=amd64 go test -c -v ./... | ||
- run: GOOS=linux GOARCH=arm go test -c -v ./... | ||
- run: GOOS=linux GOARCH=arm64 go test -c -v ./... | ||
- run: GOOS=windows GOARCH=amd64 go test -c -v ./... | ||
- run: GOOS=windows GOARCH=386 go test -c -v ./... | ||
- run: GOOS=windows GOARCH=arm go test -c -v ./... | ||
- run: GOOS=windows GOARCH=arm64 go test -c -v ./... | ||
jobs: | ||
build: | ||
uses: charmbracelet/meta/.github/workflows/build.yml@main |
This file contains 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