Skip to content

Commit

Permalink
Merge pull request #459 from trheyi/main
Browse files Browse the repository at this point in the history
[change] fix arm64 build action
  • Loading branch information
trheyi authored Sep 21, 2023
2 parents 7555776 + d4695e7 commit 453c791
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@ jobs:
steps:
- name: Arm Build
run: |
sudo sh -c 'echo "deb http://cz.archive.ubuntu.com/ubuntu mantic main universe" >> /etc/apt/sources.list'
sudo apt-get update
sudo apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc
sudo apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
sudo apt-get install -y g++-aarch64-linux-gnu crossbuild-essential-arm64
sudo apt-get install -y gcc-13-aarch64-linux-gnu
sudo apt-get install -y g++-13-aarch64-linux-gnu
- name: Inspect Tools
run: |
ls -l /usr/lib/gcc-cross/aarch64-linux-gnu/
- name: Install coscmd
run: sudo pip3 install coscmd
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ artifacts-linux: clean
# Making artifacts
mkdir -p dist
CGO_ENABLED=1 CGO_LDFLAGS="-static" GOOS=linux GOARCH=amd64 go build -v -o dist/yao-${VERSION}-dev-linux-amd64
CGO_ENABLED=1 CGO_LDFLAGS="-static" GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ go build -v -o dist/yao-${VERSION}-dev-linux-arm64
# CGO_ENABLED=1 CGO_LDFLAGS="-static" GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ go build -v -o dist/yao-${VERSION}-dev-linux-arm64
CGO_ENABLED=1 CGO_LDFLAGS="-static" LD_LIBRARY_PATH=/usr/lib/gcc-cross/aarch64-linux-gnu/13 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc-13 CXX=aarch64-linux-gnu-g++-13 go build -v -o dist/yao-${VERSION}-dev-linux-arm64

mkdir -p dist/release
mv dist/yao-*-* dist/release/
Expand Down

0 comments on commit 453c791

Please sign in to comment.