Mucking with github #12 #59
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: CMake | ||
on: [push] | ||
env: | ||
BUILD_TYPE: Release | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: macos-latest | ||
java: '8' | ||
- os: macos-latest | ||
java: '11' | ||
- os: macos-latest | ||
java: '17' | ||
- os: macos-latest | ||
java: '21' | ||
- os: windows-latest | ||
java: '8' | ||
- os: windows-latest | ||
java: '11' | ||
- os: windows-latest | ||
java: '17' | ||
- os: windows-latest | ||
java: '21' | ||
- os: ubuntu-latest | ||
java: '8' | ||
compiler: 'gcc-11|g++-11' | ||
- os: ubuntu-latest | ||
java: '8' | ||
compiler: 'gcc-12|g++-12' | ||
- os: ubuntu-latest | ||
java: '8' | ||
compiler: 'gcc-13|g++-13' | ||
- os: ubuntu-latest | ||
java: '8' | ||
compiler: 'clang-13|clang++-13' | ||
- os: ubuntu-latest | ||
java: '8' | ||
compiler: 'clang-14|clang++-14' | ||
- os: ubuntu-latest | ||
java: '8' | ||
compiler: 'clang-15|clang++-15' | ||
- os: ubuntu-latest | ||
java: '17' | ||
compiler: 'gcc-11|g++-11' | ||
- os: ubuntu-latest | ||
java: '17' | ||
compiler: 'gcc-12|g++-12' | ||
- os: ubuntu-latest | ||
java: '17' | ||
compiler: 'gcc-13|g++-13' | ||
- os: ubuntu-latest | ||
java: '17' | ||
compiler: 'clang-13|clang++-13' | ||
- os: ubuntu-latest | ||
java: '17' | ||
compiler: 'clang-14|clang++-14' | ||
- os: ubuntu-latest | ||
java: '17' | ||
compiler: 'clang-15|clang++-15' | ||
- os: ubuntu-latest | ||
java: '21' | ||
compiler: 'gcc-11|g++-11' | ||
- os: ubuntu-latest | ||
java: '21' | ||
compiler: 'gcc-12|g++-12' | ||
- os: ubuntu-latest | ||
java: '21' | ||
compiler: 'gcc-13|g++-13' | ||
- os: ubuntu-latest | ||
java: '21' | ||
compiler: 'clang-13|clang++-13' | ||
- os: ubuntu-latest | ||
java: '21' | ||
compiler: 'clang-14|clang++-14' | ||
- os: ubuntu-latest | ||
java: '21' | ||
compiler: 'clang-15|clang++-15' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: System Setup | ||
shell: bash | ||
run: | | ||
if [[ '${{ matrix.os }}' == 'ubuntu-latest' ]]; then | ||
if [[ '${{ matrix.compiler}}' == 'clang-15|clang++-15' ]]; then | ||
sudo apt-get update | ||
sudo apt-get install -y clang-15 clang++-15 | ||
fi | ||
if [[ '${{ matrix.compiler }}' == 'gcc-12|g++-12' ]]; then | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-12 g++-12 | ||
fi | ||
if [[ '${{ matrix.compiler }}' == 'gcc-13|g++-13' ]]; then | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-13 g++-13 | ||
fi | ||
fi | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: | | ||
8 | ||
${{ matrix.java }} | ||
distribution: 'temurin' | ||
- name: Configure CMake | ||
shell: bash | ||
run: | | ||
if [[ '${{ matrix.compiler }}' != '' ]]; then | ||
IFS='|' read -ra COMPILER <<< '${{ matrix.compiler }}' | ||
export CC=${COMPILER[0]} | ||
export CXX=${COMPILER[1]} | ||
fi | ||
cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE | ||
- name: Build and Test Native | ||
shell: bash | ||
run: cmake --build build --config $BUILD_TYPE --target run-jar | ||
- name: Build and Test JniGen | ||
shell: bash | ||
run: cmake --build build --config $BUILD_TYPE --target run-java-tests | ||
# - name: Test JniGen | ||
# working-directory: ${{github.workspace}}/jnigen | ||
# shell: bash | ||
# run: ./gradlew -PbuildDir=build -Pcode.version=SNAPSHOT test | ||