Skip to content

fix: make sure each stuffs is ready #84

fix: make sure each stuffs is ready

fix: make sure each stuffs is ready #84

Workflow file for this run

name: <Test> Native Compiling
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
platform: [ windows, linux, macos, android ]
build_type: [ minsizerel ]
arch: [ x86_64, aarch64, arm64, x86, arm64-v8a, armeabi-v7a ]
include:
- os: windows-latest
platform: windows # Platform: Windows (keep: x86_64, x86, arm64)
c_compiler: cl
cpp_compiler: cl
- os: macos-latest
platform: macos # Platform: MacOS (keep: x86_64, arm64)
c_compiler: clang
cpp_compiler: clang++
- os: ubuntu-latest
platform: linux # Platform: Linux (keep: x86_64, aarch64)
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
platform: android # Platform: Android (keep: x86_64, x86, arm64-v8a, armeabi-v7a)
c_compiler: clang
cpp_compiler: clang++
exclude:
# Linux (keep: x86_64, aarch64)
- platform: linux
arch: arm64-v8a
- platform: linux
arch: armeabi-v7a
- platform: linux
arch: x86
- platform: linux
arch: arm64
# macOS (keep: x86_64, arm64)
- platform: macos
arch: arm64-v8a
- platform: macos
arch: armeabi-v7a
- platform: macos
arch: x86
- platform: macos
arch: aarch64
# Windows (keep: x86_64, x86, arm64)
- platform: windows
arch: arm64-v8a
- platform: windows
arch: armeabi-v7a
- platform: windows
arch: aarch64
# Android (keep: x86_64, x86, arm64-v8a, armeabi-v7a)
- platform: android
arch: aarch64
- platform: android
arch: arm64
# Exclude unsupported compiler combinations
- os: windows-latest
platform: linux
- os: windows-latest
platform: macos
- os: ubuntu-latest
platform: windows
- os: ubuntu-latest
platform: macos
- os: macos-latest
platform: windows
- os: macos-latest
platform: linux
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Install dependencies on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc g++ gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Install dependencies on macOS
if: runner.os == 'macOS'
run: brew install ninja
- name: Install dependencies on Windows
if: runner.os == 'Windows'
run: choco install ninja
- name: Set up Android SDK and NDK
if: matrix.platform == 'android'
uses: android-actions/setup-android@v2
with:
api-level: 27
ndk-version: 26.1.10909125
cmake-version: 3.29.5
- name: Run auto_build.sh
shell: bash
run: |
if [ "${{ matrix.platform }}" == "android" ]; then
clang -print-targets
bash ./auto_build.sh --platform android \
--cmake "cmake" \
--ninja "ninja" \
--build-type ${{ matrix.build_type }} \
--arch-abi ${{ matrix.arch }} \
--jobs 4 \
--android-ndk "$ANDROID_NDK_HOME" \
--android-ver 27 \
-c
else
bash ./auto_build.sh --platform ${{ matrix.platform }} \
--cmake "cmake" \
--ninja "ninja" \
--build-type ${{ matrix.build_type }} \
--arch-abi ${{ matrix.arch }} \
--jobs 4 \
-c
fi
# - name: Test
# working-directory: ${{ steps.strings.outputs.build-output-dir }}
# run: ctest --build-config ${{ matrix.build_type }}