Fix bad path and upload #58
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 | ||
- os: windows | ||
arch: aarch64 | ||
msys: clangarm64 | ||
runner: windows-latest | ||
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 MSYS | ||
if: ${{ matrix.msys }} | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: ${{ matrix.msys }} | ||
path-type: inherit | ||
- name: Configure CMake | ||
if: ${{ !matrix.msys }} | ||
shell: bash | ||
run: > | ||
cmake -B cmakebuild | ||
-DCMAKE_TOOLCHAIN_FILE="toolchains/${{ matrix.os }}-${{ matrix.arch }}.cmake" | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
- name: Configure CMake | ||
if: ${{ matrix.msys }} | ||
shell: msys2 {0} | ||
run: > | ||
cmake -B cmakebuild | ||
-DCMAKE_TOOLCHAIN_FILE="toolchains/${{ matrix.os }}-${{ matrix.arch }}.cmake" | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
- name: Build | ||
run: cmake --build cmakebuild --config ${{ matrix.build_type }} | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ matrix.os == "windows" }} | ||
Check failure on line 79 in .github/workflows/commit.yml GitHub Actions / Build NativesInvalid workflow file
|
||
with: | ||
name: ${{ matrix.os }}-${{ matrix.arch }} | ||
path: cmakebuild/${{ matrix.build_type }}/${{ matrix.libname }} | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ matrix.os != "windows" }} | ||
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 }} | ||