Change shell again #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Natives | ||
on: | ||
push: | ||
branches: | ||
- natives | ||
jobs: | ||
build-natives: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [linux, macos, windows] | ||
arch: [i386, x86_64, aarch64, arm] | ||
build_type: [Release] | ||
include: | ||
- os: linux | ||
runner: ubuntu-latest | ||
libname: libopensesamenative.so | ||
- os: macos | ||
runner: macos-latest | ||
libname: libopensesamenative.dylib | ||
- os: windows | ||
runner: ubuntu-latest | ||
libname: opensesamenative.dll | ||
- os: linux | ||
arch: i386 | ||
compiler_package: g++-i686-linux-gnu | ||
- os: linux | ||
arch: aarch64 | ||
compiler_package: g++-aarch64-linux-gnu | ||
- os: linux | ||
arch: arm | ||
compiler_package: g++-arm-linux-gnueabi | ||
- os: windows | ||
arch: x86_64 | ||
compiler_package: g++-mingw-w64-x86-64 | ||
- os: windows | ||
arch: i386 | ||
compiler_package: g++-mingw-w64-i686 | ||
- shell: bash | ||
- os: windows | ||
arch: aarch64 | ||
msys: CLANGARM64 | ||
runner: windows-latest | ||
shell: msys2 {0} | ||
exclude: | ||
- os: macos | ||
arch: i386 | ||
- os: macos | ||
arch: arm | ||
- os: windows | ||
arch: arm | ||
runs-on: ${{ matrix.runner }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup GCC | ||
if: ${{ matrix.compiler_package }} | ||
run: sudo apt install -y ${{ matrix.compiler_package }} | ||
- name: Setup MSYS2 | ||
if: ${{ matrix.msys }} | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: ${{ matrix.msys }} | ||
- name: Configure CMake | ||
shell: ${{ matrix.shell }} | ||
Check failure on line 64 in .github/workflows/commit.yml GitHub Actions / Build NativesInvalid workflow file
|
||
run: > | ||
cmake -B cmakebuild | ||
-DCMAKE_TOOLCHAIN_FILE="toolchains/${{ matrix.os }}-${{ matrix.arch }}.cmake" | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: cmake --build cmakebuild --config ${{ matrix.build_type }} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.os }}-${{ matrix.arch }} | ||
path: cmakebuild/${{ matrix.libname }} | ||
publish: | ||
permissions: | ||
contents: read | ||
packages: write | ||
runs-on: ubuntu-latest | ||
needs: [build-natives] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
- run: ./gradlew publish -Pcommit_sha=${{ github.sha }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||