From 13ac9e9f0bee59d783b0a20374066977d8b013ec Mon Sep 17 00:00:00 2001 From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com> Date: Fri, 17 Jan 2025 00:09:48 +0100 Subject: [PATCH 1/2] Add SITL linux aarch64 build --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8138a501556..4d7218ed860 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,6 +105,37 @@ jobs: name: targets path: targets.txt + build-SITL-Linux-arm64: + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: sudo apt-get update && sudo apt-get -y install ninja-build + - name: Setup environment + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + run: | + # This is the hash of the commit for the PR + # when the action is triggered by PR, empty otherwise + COMMIT_ID=${{ github.event.pull_request.head.sha }} + # This is the hash of the commit when triggered by push + # but the hash of refs/pull//merge, which is different + # from the hash of the latest commit in the PR, that's + # why we try github.event.pull_request.head.sha first + COMMIT_ID=${COMMIT_ID:-${{ github.sha }}} + BUILD_SUFFIX=ci-$(date '+%Y%m%d')-$(git rev-parse --short ${COMMIT_ID}) + VERSION=$(grep project CMakeLists.txt|awk -F VERSION '{ gsub(/[ \t)]/, "", $2); print $2 }') + echo "BUILD_SUFFIX=${BUILD_SUFFIX}" >> $GITHUB_ENV + echo "BUILD_NAME=inav-${VERSION}-${BUILD_SUFFIX}" >> $GITHUB_ENV + echo "NUM_CORES=$(grep processor /proc/cpuinfo | wc -l)" >> $GITHUB_ENV + - name: Build SITL + run: mkdir -p build_SITL && cd build_SITL && cmake -DSITL=ON -DWARNINGS_AS_ERRORS=ON -G Ninja .. && ninja -j${{ env.NUM_CORES }} + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ env.BUILD_NAME }}_SITL-Linux-aarch64 + path: ./build_SITL/*_SITL + build-SITL-Linux: runs-on: ubuntu-latest steps: From 7014f7c1d7d29f24f2207da33b0b43950130d636 Mon Sep 17 00:00:00 2001 From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com> Date: Fri, 17 Jan 2025 00:14:53 +0100 Subject: [PATCH 2/2] Add arm sitl to release artifacts --- .github/workflows/nightly-build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 793f89c7e5e..9e9d68fa0d3 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -46,6 +46,12 @@ jobs: path: resources/sitl/linux pattern: inav-*SITIL-Linux merge-multiple: true + - name: download sitl linux aarch64 + uses: actions/download-artifact@v4 + with: + path: resources/sitl/linux/arm64 + pattern: inav-*SITIL-Linux-aarch64 + merge-multiple: true - name: download sitl windows uses: actions/download-artifact@v4 with: