Codebase list golang-github-petermattis-goid / 4d14c49
Test on ARM Tamir Duberstein authored 2 years ago Tamir Duberstein committed 2 years ago
1 changed file(s) with 47 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
1212 runs-on: ubuntu-latest
1313 strategy:
1414 matrix:
15 arch:
16 - armv6
17 - armv7
18 - aarch64
19 - x64
1520 go:
16 - '1.3'
17 - '1.4'
1821 - '1.5'
1922 - '1.6'
2023 - '1.7'
2831 - '1.15'
2932 - '1.16'
3033 - '1.17'
34 race_build:
35 - true
36 include:
37 - go: '1.3'
38 arch: x64
39 race_build: false
40 - go: '1.4'
41 arch: x64
42 race_build: false
3143 steps:
3244 - uses: actions/checkout@v2
3345 - name: Set up Go
3446 uses: actions/setup-go@v2
3547 with:
36 go-version: '${{ matrix.go }}'
48 go-version: ${{ matrix.go }}
3749 - name: 'Build with ${{ matrix.go }}'
50 if: ${{ matrix.arch == 'x64' }}
3851 run: go build -v ./...
3952 - name: 'Test with ${{ matrix.go }}'
53 if: ${{ matrix.arch == 'x64' }}
4054 run: go test -v ./...
4155 - name: 'TestRace with ${{ matrix.go }}'
56 if: ${{ matrix.arch == 'x64' && matrix.race_build }}
4257 run: go test -race -v ./...
4358 - name: 'Bench with ${{ matrix.go }}'
59 if: ${{ matrix.arch == 'x64' }}
4460 run: go test -bench=. -benchmem -v ./...
4561 - name: 'BenchRace with ${{ matrix.go }}'
62 if: ${{ matrix.arch == 'x64' && matrix.race_build }}
4663 run: go test -bench=. -benchmem -race -v ./...
64 - name: 'BuildTest with ${{ matrix.go }} for armv6'
65 if: ${{ matrix.arch == 'armv6' }}
66 env:
67 GOARCH: arm
68 GOARM: 6
69 run: go test -c ./...
70 - name: 'BuildTest with ${{ matrix.go }} for armv7'
71 if: ${{ matrix.arch == 'armv7' }}
72 env:
73 GOARCH: arm
74 GOARM: 7
75 run: go test -c ./...
76 - name: 'BuildTest with ${{ matrix.go }} for aarch64'
77 if: ${{ matrix.arch == 'aarch64' }}
78 env:
79 GOARCH: arm64
80 run: go test -c ./...
81 - name: 'Test and Bench with ${{ matrix.go }} on ${{ matrix.arch }}'
82 if: ${{ matrix.arch != 'x64' }}
83 uses: uraimo/run-on-arch-action@v2.1.1
84 with:
85 arch: ${{ matrix.arch }}
86 distro: bullseye
87 dockerRunArgs: --mount type=bind,source="$(pwd)",target=/checkout,readonly
88 run: |
89 find /checkout -name '*.test' -type f -executable -exec '{}' -test.v \;
90 find /checkout -name '*.test' -type f -executable -exec '{}' -test.bench=. -test.benchmem -test.v \;