Skip to content

Commit

Permalink
Add ARM64 CI Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Niam5 committed Nov 27, 2023
1 parent dfb71b9 commit aa4e776
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/ubuntu-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Ubuntu Arm64 build

on: [push]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
REPO_DIR : ${{github.workspace}}
BUILD_DIR: ${{github.workspace}}/bin/builddir

jobs:
build:
runs-on: [self-hosted, linux, ARM64]
permissions:
contents: read

strategy:
matrix:
include:
- COMPILER_CC: clang
COMPILER_PP: clang++
USE_PCH: ON
EXTRA_BUILD: "-DBUILD_AHBOT=ON -DBUILD_PLAYERBOT=ON -DBUILD_SOLOCRAFT=ON "

steps:

- name: Cleanup
run: |
rm -rf ./* || true
rm -rf ./.??* || true
- name: Checkout
uses: actions/checkout@v3
with:
path: ${{env.REPO_DIR}}
submodules: true

- name: Create Build Environment
run: |
echo "GITHUB_SHORT_REV=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "ARCHIVE_FILENAME=${{ github.event.repository.name }}-$(git rev-parse --short HEAD).zip" >> $GITHUB_ENV
echo "CC=${{matrix.COMPILER_CC}}" >> $GITHUB_ENV
echo "CXX=${{matrix.COMPILER_PP}}" >> $GITHUB_ENV
cmake -E make_directory ${{ env.BUILD_DIR }}
- name: Configure
env:
USE_PCH: ${{ matrix.USE_PCH }}
EXTRA_BUILD: ${{ matrix.EXTRA_BUILD }}
run: cmake -DBUILD_ELUNA=ON -DPCH=${{env.USE_PCH}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/bin/run ${{env.EXTRA_BUILD}}-B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}

- name: Build
env:
MAKEFLAGS: "-j 3"
run: |
cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}}
cmake --install ${{env.BUILD_DIR}}
notify:
name: Discord Notification
runs-on: ubuntu-22.04
permissions:
contents: none
needs: # make sure the notification is sent AFTER the jobs you want included have completed
- build
if: failure()

steps:
- name: Env
run: |
echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "GIT_SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Notify
uses: rjstone/discord-webhook-notify@v1.0.4
with:
severity: error
username: ${{env.EXPENSION_NAME}}-core
description: |
**Linux buid failed**
details: |
- **Branch:** ${{env.GIT_BRANCH}}
- **Pusher:** ${{github.event.pusher.name}}
- **Author:** ${{github.event.head_commit.author.name}}
- **Commit:** [${{github.repository}}/${{env.GIT_SHORT_SHA}}](${{github.server_url}}/${{ github.repository }}/commit/${{github.sha}})
- **Build log:** [actions/runs/${{github.run_id}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})
footer: Next time ${{github.event.pusher.name}}!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png

0 comments on commit aa4e776

Please sign in to comment.