Skip to content

Commit

Permalink
enable ci for aarch64 (#84)
Browse files Browse the repository at this point in the history
* enable ci for aarch64

* fix typo

* fixes

* fix selecting msvc compiler

* fix linux cross

* try

* fix linux cross build

* disable examples when building for linux/aarch64

* try again
  • Loading branch information
skallweitNV authored Oct 18, 2024
1 parent ebc2b53 commit b322abb
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,46 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
os: ["windows", "linux", "macos"]
platform: ["x86_64", "aarch64"]
config: ["Debug", "Release"]
include:
- {os: windows, runs-on: windows-latest}
- {os: linux, runs-on: ubuntu-latest}
- {os: macos, runs-on: macos-latest}
exclude:
- {os: macos, platform: x86_64}

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runs-on }}

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup Linux
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'linux'
run: sudo apt-get update && sudo apt-get install -y xorg-dev

- name: Setup Linux (aarch64 cross-compilation)
if: matrix.os == 'linux' && matrix.platform == 'aarch64'
run: |
sudo apt-get update
sudo apt-get install -y crossbuild-essential-arm64
echo "CC=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
echo "CXX=aarch64-linux-gnu-g++" >> "$GITHUB_ENV"
echo "CMAKE_ARGS='-DSLANG_RHI_BUILD_EXAMPLES=0'" >> "$GITHUB_ENV"
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.platform == 'aarch64' && 'amd64_arm64' || 'amd64'}}

- name: Setup CMake/Ninja
uses: lukka/get-cmake@latest

- name: Configure
run: cmake -S . -B build
run: cmake --preset default -S . -B build ${{env.CMAKE_ARGS}}

- name: Build
run: cmake --build build -j 2

0 comments on commit b322abb

Please sign in to comment.