-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github Actions: add linux-aarch64 release build
- Loading branch information
Showing
5 changed files
with
141 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM rust:1 | ||
#FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:edge | ||
|
||
# set CROSS_DOCKER_IN_DOCKER to inform `cross` that it is executed from within a container | ||
ENV CROSS_DOCKER_IN_DOCKER=true | ||
|
||
RUN cargo install cross | ||
RUN dpkg --add-architecture arm64 && \ | ||
apt-get update && \ | ||
apt-get install -qy curl && \ | ||
curl -sSL https://get.docker.com/ | sh && \ | ||
apt-get install --assume-yes libxkbcommon0:arm64 libwayland-cursor0:arm64 libxkbcommon-dev:arm64 libwayland-dev:arm64 libxkbcommon-x11-dev:arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
on: [push] | ||
|
||
name: linux-aarch64 build | ||
|
||
jobs: | ||
linux_aarch64: | ||
name: Linux aarch64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: aarch64-unknown-linux-gnu | ||
override: true | ||
- name: Build cross image | ||
run: | | ||
#cargo install cross | ||
docker build -t wasmer/aarch64 /home/runner/work/wasmer/wasmer/.github/cross-linux-aarch64/ | ||
#cat << EOF > ./Cross.toml | ||
#[target.aarch64-unknown-linux-gnu] | ||
#image = "wasmer/aarch64" | ||
#EOF | ||
env: | ||
CROSS_DOCKER_IN_DOCKER: true | ||
- name: Install LLVM | ||
shell: bash | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -yq tree | ||
curl --proto '=https' --tlsv1.2 -sSf "https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-aarch64-linux-gnu.tar.xz" -L -o llvm.tar.xz | ||
LLVM_DIR=$(pwd)/${{ env.LLVM_DIR }} | ||
mkdir ${LLVM_DIR} | ||
tar xf llvm.tar.xz --strip-components=1 -C ${LLVM_DIR} | ||
echo "${LLVM_DIR}/bin" >> $GITHUB_PATH | ||
echo "LLVM_SYS_120_PREFIX=${LLVM_DIR}" >> $GITHUB_ENV | ||
env: | ||
LLVM_DIR: .llvm | ||
- name: Build Wasmer binary | ||
run: | | ||
make build-wasmer | ||
env: | ||
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v /home/runner/work/wasmer/wasmer:/project -w /project wasmer/aarch64 cross | ||
CROSS_DOCKER_IN_DOCKER: true | ||
CARGO_TARGET: --target aarch64-unknown-linux-gnu | ||
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig | ||
PKG_CONFIG_ALLOW_CROSS: true | ||
- name: Build C API | ||
run: | | ||
make build-capi | ||
env: | ||
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v /home/runner/work/wasmer/wasmer:/project -w /project wasmer/aarch64 cross | ||
CROSS_DOCKER_IN_DOCKER: true | ||
CARGO_TARGET: --target aarch64-unknown-linux-gnu | ||
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig | ||
PKG_CONFIG_ALLOW_CROSS: true | ||
- name: Dist | ||
run: | | ||
#tree target/ | ||
make distribution | ||
env: | ||
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v /home/runner/work/wasmer/wasmer:/project -w /project wasmer/aarch64 cross | ||
CROSS_DOCKER_IN_DOCKER: true | ||
CARGO_TARGET: --target aarch64-unknown-linux-gnu | ||
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig | ||
PKG_CONFIG_ALLOW_CROSS: true | ||
TARGET: aarch64-unknown-linux-gnu | ||
TARGET_DIR: target/aarch64-unknown-linux-gnu/release | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wasmer.tar.gz | ||
path: dist | ||
if-no-files-found: error | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.