From cd1402ea000c08db55a29982ddabf0c943f6c0a8 Mon Sep 17 00:00:00 2001 From: peefy Date: Wed, 31 Jan 2024 19:44:36 +0800 Subject: [PATCH] zz Signed-off-by: peefy --- .github/workflows/ubuntu_test.yaml | 22 ++++++++++++++++++++++ scripts/build.sh | 1 + 2 files changed, 23 insertions(+) diff --git a/.github/workflows/ubuntu_test.yaml b/.github/workflows/ubuntu_test.yaml index 1d25839ea..4781c0bc5 100644 --- a/.github/workflows/ubuntu_test.yaml +++ b/.github/workflows/ubuntu_test.yaml @@ -65,3 +65,25 @@ jobs: with: name: kcl-linux-amd64 path: _build/dist/ubuntu/kclvm + + build-and-test-arm64: + name: Test + runs-on: ubuntu-latest + steps: + # QEMU enables you run arm64 image on x86 machines + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/arm64 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Run custom ARM64 Docker image + run: | + docker run --rm \ + -v ${{ github.workspace }}:/workspace -w /workspace \ + kcllang/kcl-builder-arm64 \ + make && make release + - uses: actions/upload-artifact@v3 + with: + name: kcl-linux-arm64 + path: _build/dist/ubuntu/kclvm diff --git a/scripts/build.sh b/scripts/build.sh index b592bf779..7581044b7 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -23,6 +23,7 @@ prepare_dirs # 1. Build kcl native library cd $topdir/kclvm +export PATH=$PATH:/root/.cargo/bin/ cargo build --release ## Switch dll file extension according to os.