Skip to content

Commit 69ad155

Browse files
author
lmbsog0
committed
Merge remote-tracking branch 'origin/main' into develop
2 parents b8d6a62 + 32d8804 commit 69ad155

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

.github/workflows/build.yml

+40-2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,32 @@ jobs:
8686
runs-on: ubuntu-22.04
8787
needs:
8888
- test-linux
89+
strategy:
90+
matrix:
91+
target: [ amd64, arm64, arm ]
92+
include:
93+
- target: amd64
94+
CGO_ENABLED: 1
95+
GOARCH: amd64
96+
CC: gcc
97+
- target: arm64
98+
CGO_ENABLED: 1
99+
GOARCH: arm64
100+
CC: /usr/local/gcc-linaro-4.8-2015.06-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
101+
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
102+
toolchain_extract: sudo tar -xf gcc-linaro-4.8-2015.06-x86_64_aarch64-linux-gnu.tar.xz -C /usr/local
103+
- target: arm
104+
CGO_ENABLED: 1
105+
GOARCH: arm
106+
CC: /usr/local/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc
107+
toolchain_source: https://releases.linaro.org/archive/15.06/components/toolchain/binaries/4.8/arm-linux-gnueabi/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabi.tar.xz
108+
toolchain_extract: sudo tar -xf gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabi.tar.xz -C /usr/local
109+
env:
110+
CGO_ENABLED: ${{ matrix.CGO_ENABLED }}
111+
GOOS: linux
112+
GOARCH: ${{ matrix.GOARCH }}
113+
CC: ${{ matrix.CC }}
114+
name: build-linux-${{ matrix.target }}
89115
steps:
90116
- uses: actions/checkout@v4
91117
- uses: actions/download-artifact@v4
@@ -96,12 +122,16 @@ jobs:
96122
with:
97123
name: grpc
98124
path: pkg/a2l
125+
- if: ${{ matrix.CC != 'gcc' }}
126+
run: |
127+
wget ${{ matrix.toolchain_source }}
128+
${{ matrix.toolchain_extract }}
99129
- run: |
100130
go get github.com/antlr4-go/antlr/v4
101131
go build --buildmode=c-shared -o a2l_grpc_$(go env GOOS)_$(go env GOARCH).so ./cmd/a2l/a2l.go
102132
- uses: actions/upload-artifact@v4
103133
with:
104-
name: linux
134+
name: linux_${{ matrix.target }}
105135
path: |
106136
*.so
107137
*.h
@@ -199,7 +229,15 @@ jobs:
199229
- run: mkdir a2l_grpc
200230
- uses: actions/download-artifact@v4
201231
with:
202-
name: linux
232+
name: linux_amd64
233+
path: a2l_grpc
234+
- uses: actions/download-artifact@v4
235+
with:
236+
name: linux_arm64
237+
path: a2l_grpc
238+
- uses: actions/download-artifact@v4
239+
with:
240+
name: linux_arm
203241
path: a2l_grpc
204242
- uses: actions/download-artifact@v4
205243
with:

0 commit comments

Comments
 (0)