From 1d35ccf452214446853a99a1f5ebe94a54ea7886 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Thu, 15 Jun 2023 15:00:32 -0400 Subject: [PATCH] test build arm by workflow Signed-off-by: Frank Li --- .github/workflows/build_arm.yaml | 71 ++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/build_arm.yaml diff --git a/.github/workflows/build_arm.yaml b/.github/workflows/build_arm.yaml new file mode 100644 index 00000000..2334ac98 --- /dev/null +++ b/.github/workflows/build_arm.yaml @@ -0,0 +1,71 @@ +name: Build for arm ubuntu + +on: + push: + branches: + - master + tags: + - uuu* + pull_request: + types: + - opened + - synchronize + +jobs: + build_job: + # The host should always be linux + runs-on: ubuntu-latest + name: Build on ${{ matrix.distro }} ${{ matrix.arch }} + + # Run steps on a matrix of 4 arch/distro combinations + strategy: + matrix: + include: + - arch: aarch64 + distro: ubuntu18.04 + steps: + - uses: actions/checkout@v3 + - uses: uraimo/run-on-arch-action@v2 + name: Build artifact + id: build + with: + arch: ${{ matrix.arch }} + distro: ${{ matrix.distro }} + + # Not required, but speeds up builds + githubToken: ${{ github.token }} + + # Mount the artifacts directory as /artifacts in the container + dockerRunArgs: | + --volume "${PWD}:/mfgtools" + + # Pass some environment variables to the container + env: | # YAML, but pipe character is necessary + artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }} + + # The shell to run commands with in the container + shell: /bin/sh + + # Install some dependencies in the container. This speeds up builds if + # you are also using githubToken. Any dependencies installed here will + # be part of the container image that gets cached, so subsequent + # builds don't have to re-install them. The image layer is cached + # publicly in your project's package repository, so it is vital that + # no secrets are present in the container state or logs. + install: | + apt-get update -q -y + apt-get install -q -y libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++ zlib1g-dev git + + # Produce a binary artifact and place it in the mounted volume + run: | + cd /mfgtools + git status + cmake . + make + + - name: Show the artifact + # Items placed in /artifacts in the container will be in + # ${PWD}/artifacts on the host. + run: | + ls -al "${PWD}" +