Skip to content

Commit

Permalink
Build Linux binaries on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Mar 5, 2023
1 parent 6d2dbd4 commit e95eb2c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/linux-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: linux-packages
on:
push:
branches: [ main ]
jobs:
build:
strategy:
matrix:
target: [ x86_64, aarch64, arm, ppc64le, s390x ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: build
run: |
sudo apt-get install -y qemu-user qemu-user-binfmt
./dist.sh ${{ matrix.target }}
- name: upload
uses: actions/upload-artifact@v3
with:
path: mold-*-linux.tar.gz
2 changes: 1 addition & 1 deletion dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ version=$(sed -n 's/^project(mold VERSION \(.*\))/\1/p' $(dirname $0)/CMakeLists
dest=mold-$version-$arch-linux
set -e -x

docker run --platform linux/$arch -it --rm -v "$(pwd):/mold" \
docker run --platform linux/$arch -i --rm -v "$(pwd):/mold" \
-e "OWNER=$(id -u):$(id -g)" rui314/mold-builder:latest \
bash -c "mkdir /tmp/build &&
cd /tmp/build &&
Expand Down

0 comments on commit e95eb2c

Please sign in to comment.