File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # This workflow will build a golang project
2- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3-
41name : Go
5-
62on :
73 push :
84 branches : [ "main" ]
95 pull_request :
106 branches : [ "main" ]
11-
127jobs :
13-
14- build_test_amd64 :
15- name : Build on ubuntu-latest amd64
16- runs-on : ubuntu-latest
8+ build :
9+ runs-on : ${{ matrix.os }}
10+ strategy :
11+ matrix :
12+ include :
13+ - os : ubuntu-24.04
14+ arch : amd64
15+ build : true
16+ - os : ubuntu-24.04-arm
17+ arch : arm64
18+ build : true
1719 steps :
18- - uses : actions/checkout@v3
19-
20- - name : Set up Go
21- uses : actions/setup-go@v3
22- with :
23- go-version : 1.19
24-
25- - name : Test
26- run : go test -v .
27-
28- build_test_arm64 :
29- runs-on : ubuntu-latest
30- name : Build on ubuntu-latest arm64
31- steps :
32- - uses : actions/checkout@v3
33- - uses : uraimo/run-on-arch-action@v2
34- name : Run commands
35- id : runcmd
20+ - name : Checkout source
21+ uses : actions/checkout@v4
22+ - name : Set up golang
23+ uses : actions/setup-go@v5
3624 with :
37- arch : aarch64
38- distro : ubuntu22.04
39-
40- # speeds up builds by storing container images in a GitHub package registry.
41- githubToken : ${{ github.token }}
42-
43- install : |
44- apt-get -y update;
45- apt-get install -q -y git golang-go;
46- which go;
47-
48- run : |
49- go version;
50- go test -v .;
25+ go-version : 1.24
26+ - name : Install build dependencies
27+ run : |
28+ sudo apt-get update
29+ sudo apt-get install golang make
30+ - name : Run go test
31+ run : go test -v .
You can’t perform that action at this time.
0 commit comments