Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Test linux matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Franc Pape committed Apr 10, 2024
1 parent 6ae7f53 commit 7a3c728
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,25 @@ jobs:
runs-on: ubuntu-22.04
needs:
- test-linux
strategy:
matrix:
target: [ amd64, arm64 ]
include:
- target: amd64
CGO_ENABLED: 0
GOARCH: amd64
- target: arm64
CGO_ENABLED: 1
GOARCH: arm64
CC: ${{ github.workspace }}/gcc-linaro-4.8-2015.06-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
toolchain_source: https://releases.linaro.org/archive/15.06/components/toolchain/binaries/4.8/aarch64-linux-gnu/gcc-linaro-4.8-2015.06-x86_64_aarch64-linux-gnu.tar.xz
toolchain_extract: tar -xf gcc-linaro-4.8-2015.06-x86_64_aarch64-linux-gnu.tar.xz
env:
CGO_ENABLED: 1
GOOS: linux
GOARCH: arm64
CC: ${{ github.workspace }}/gcc-linaro-4.8-2015.06-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
name: build-linux-${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand All @@ -102,8 +116,10 @@ jobs:
name: grpc
path: pkg/a2l
- run: |
wget https://releases.linaro.org/archive/15.06/components/toolchain/binaries/4.8/aarch64-linux-gnu/gcc-linaro-4.8-2015.06-x86_64_aarch64-linux-gnu.tar.xz
tar -xf gcc-linaro-4.8-2015.06-x86_64_aarch64-linux-gnu.tar.xz
wget ${{ matrix.toolchain_source }}
${{ matrix.toolchain_extract }}
if: ${{ matrix.CGO_ENABLED == 1}}
- run: |
go get github.com/antlr4-go/antlr/v4
go build --buildmode=c-shared -o a2l_grpc_$(go env GOOS)_$(go env GOARCH).so ./cmd/a2l/a2l.go
- uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 7a3c728

Please sign in to comment.