Skip to content

Commit

Permalink
Attempt to build arm64 linux packages (rpi friendly)
Browse files Browse the repository at this point in the history
Will it work?
  • Loading branch information
mmosca committed Aug 21, 2024
1 parent ccfc1f9 commit 8c4fe34
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,59 @@ jobs:
name: ${{ env.BUILD_NAME }}_ZIP
path: ./out/make/zip/linux/x64/*.zip

build-linux-arm64:
runs-on: [ubuntu-latest, arm64]
steps:
- uses: actions/checkout@v4
- 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/<n>/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 version package.json | sed 's/.*"\([0-9][0-9]*.[0-9]*.[0-9]*\)".*/\1/g')
echo "ACTIONS_STEP_DEBUG=true" >> $GITHUB_ENV
echo "BUILD_SUFFIX=${BUILD_SUFFIX}" >> $GITHUB_ENV
echo "BUILD_NAME=inav-configurator_linux_arm64_${VERSION}_${BUILD_SUFFIX}" >> $GITHUB_ENV
- uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true
cache: 'npm'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y install dpkg fakeroot rpm build-essential libudev-dev
- name: Install deps
uses: nick-fields/retry@v3
with:
max_attempts: 3
retry_on: error
command: npm install
timeout_minutes: 10
- name: Build Linux
run: npm run make
- name: Upload Linux deb
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_NAME }}_ARM64_DEB
path: ./out/make/deb/*/*.deb
- name: Upload Linux rpm
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_NAME }}_ARM64_RPM
path: ./out/make/rpm/x64/*.rpm
- name: Upload Linux zip
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_NAME }}_ARM64_ZIP
path: ./out/make/zip/linux/*/*.zip


build-mac-arm64:
runs-on: macos-13
Expand Down

0 comments on commit 8c4fe34

Please sign in to comment.