Update cmake-multi-platform.yml #292
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 multiple platforms | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
jobs: | ||
windows: | ||
runs-on: ${{ matrix.os }} | ||
# concurrency: | ||
# group: ${{ github.head_ref || github.ref_name }}-${{ github.workflow }}-${{ matrix.os }}-${{ matrix.build_type }} | ||
# cancel-in-progress: true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, windows-2019] | ||
build_type: [Debug, Release] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure CMake | ||
run: > | ||
cmake -B build | ||
-DCMAKE_CXX_COMPILER=cl | ||
-DCMAKE_C_COMPILER=cl | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-DPREVIEW_TEST=ON | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: cmake --build build --config ${{ matrix.build_type }} -j | ||
- name: Test | ||
working-directory: build | ||
run: ctest --build-config ${{ matrix.build_type }} --output-on-failure | ||
ubuntu-gcc: | ||
runs-on: ${{ matrix.os }} | ||
# concurrency: | ||
# group: ${{ github.head_ref || github.ref_name }}-${{ github.workflow }}-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.compiler }}-${{ matrix.compiler_version }} | ||
# cancel-in-progress: true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
build_type: [Debug, Release] | ||
compiler: [gcc] | ||
compiler_version: [9, 10, 11, 12, 13] | ||
include: | ||
- cc_compiler: gcc | ||
- cxx_compiler: g++ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up GCC | ||
uses: egor-tensin/setup-gcc@v1 | ||
with: | ||
version: ${{ matrix.compiler_version }} | ||
- name: Configure CMake | ||
env: | ||
CC: gcc | ||
CXX: g++ | ||
run: > | ||
cmake -B build | ||
-DCMAKE_CXX_COMPILER=${{ env.CXX }} | ||
-DCMAKE_C_COMPILER=${{ env.CC }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-DPREVIEW_TEST=ON | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: cmake --build build --config ${{ matrix.build_type }} -j | ||
- name: Test | ||
working-directory: build | ||
run: ctest --build-config ${{ matrix.build_type }} | ||
ubuntu-clang: | ||
runs-on: ${{ matrix.os }} | ||
# concurrency: | ||
# group: ${{ github.head_ref || github.ref_name }}-${{ github.workflow }}-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.compiler }}-${{ matrix.compiler_version }} | ||
# cancel-in-progress: true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
build_type: [Debug, Release] | ||
compiler: [clang] | ||
compiler_version: [11, 12, 13, 14, 15] | ||
include: | ||
- cc_compiler: clang | ||
- cxx_compiler: clang++ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Clang | ||
uses: egor-tensin/setup-clang@v1 | ||
with: | ||
version: ${{ matrix.compiler_version }} | ||
- name: Configure CMake | ||
env: | ||
CC: cc | ||
CXX: c++ | ||
run: > | ||
cmake -B build | ||
-DCMAKE_CXX_COMPILER=${{ env.CXX }} | ||
-DCMAKE_C_COMPILER=${{ env.CC }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-DPREVIEW_TEST=ON | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: cmake --build build --config ${{ matrix.build_type }} -j | ||
- name: Test | ||
working-directory: build | ||
run: ctest --build-config ${{ matrix.build_type }} | ||
android-ndk: | ||
runs-on: ${{ matrix.os }} | ||
# concurrency: | ||
# group: ${{ github.head_ref || github.ref_name }}-${{ github.workflow }}-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.compiler }}-${{ matrix.compiler_version }} | ||
# cancel-in-progress: true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
build_type: [Debug, Release] | ||
compiler: [ndk] | ||
compiler_version: [18, 19, 20, 21, 22, 23, 24, 25, 26] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: nttld/setup-ndk@v1 | ||
id: setup-ndk | ||
with: | ||
ndk-version: r${{ matrix.compiler_version }} | ||
add-to-path: false | ||
- run: | | ||
echo $ANDROID_HOME | ||
echo ${{ steps.setup-ndk.outputs.ndk-path }} | ||
- run: | | ||
ls $ANDROID_HOME/ndk | ||
- run: | | ||
ls ${{ steps.setup-ndk.outputs.ndk-path }} | ||
- name: Configure CMake | ||
run: > | ||
cmake -B build | ||
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-DPREVIEW_TEST=ON | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: cmake --build build --config ${{ matrix.build_type }} -j | ||
# | ||
# - name: Test | ||
# working-directory: build | ||
# run: ctest --build-config ${{ matrix.build_type }} | ||
emscripten: | ||
runs-on: ${{ matrix.os }} | ||
# concurrency: | ||
# group: ${{ github.head_ref || github.ref_name }}-${{ github.workflow }}-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.compiler }}-${{ matrix.compiler_version }} | ||
# cancel-in-progress: true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
build_type: [Debug, Release] | ||
compiler: [emscripten] | ||
compiler_version: [3.1.20, 3.1.40, 3.1.60, latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Emscripten | ||
run: | | ||
git clone https://github.com/emscripten-core/emsdk.git | ||
cd emsdk | ||
./emsdk install ${{ matrix.compiler_version }} | ||
./emsdk activate ${{ matrix.compiler_version }} | ||
- name: Configure CMake | ||
run: | | ||
source emsdk/emsdk_env.sh | ||
emcmake cmake -B build \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | ||
-DPREVIEW_TEST=ON \ | ||
-DCMAKE_CROSSCOMPILING_EMULATOR=node \ | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: | | ||
source emsdk/emsdk_env.sh | ||
emmake cmake --build build --config ${{ matrix.build_type }} -j | ||
- name: Test | ||
working-directory: build | ||
run: ctest --build-config ${{ matrix.build_type }} | ||
macos-appleclang: | ||
runs-on: ${{ matrix.os }} | ||
# concurrency: | ||
# group: ${{ github.head_ref || github.ref_name }}-${{ github.workflow }}-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.compiler }} | ||
# cancel-in-progress: true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-12, macos-latest] | ||
build_type: [Debug, Release] | ||
compiler: [clang] | ||
include: | ||
- cc_compiler: clang | ||
- cxx_compiler: clang++ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure CMake | ||
env: | ||
CC: ${{ matrix.cc_compiler }} | ||
CXX: ${{ matrix.cxx_compiler }} | ||
run: > | ||
cmake -B build | ||
-DCMAKE_CXX_COMPILER=${{ env.CXX }} | ||
-DCMAKE_C_COMPILER=${{ env.CC }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-DPREVIEW_TEST=ON | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: cmake --build build --config ${{ matrix.build_type }} -j | ||
- name: Test | ||
working-directory: build | ||
run: ctest --build-config ${{ matrix.build_type }} | ||
intel-cpp: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ubuntu-latest | ||
Check failure on line 267 in .github/workflows/cmake-multi-platform.yml GitHub Actions / CMake on multiple platformsInvalid workflow file
|
||
build_type: [Debug, Release] | ||
# compiler: [clang] | ||
# include: | ||
# - cc_compiler: clang | ||
# - cxx_compiler: clang++ | ||
steps: | ||
- name: Intel Apt repository | ||
timeout-minutes: 1 | ||
run: | | ||
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | ||
sudo apt-get update | ||
- name: Install Intel oneAPI compilers | ||
timeout-minutes: 5 | ||
run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp | ||
- name: Setup Intel oneAPI environment | ||
run: | | ||
source /opt/intel/oneapi/setvars.sh | ||
printenv >> $GITHUB_ENV | ||
cat /opt/intel/oneapi/setvars.sh | ||
- name: checkout project code | ||
uses: actions/checkout@v4 | ||
- name: CMake Configure | ||
run: > | ||
cmake -B build | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-DPREVIEW_TEST=ON | ||
-S ${{ github.workspace }} | ||
- name: CMake build | ||
run: cmake --build build --config ${{ matrix.build_type }} -j | ||
- name: CMake test | ||
working-directory: build | ||
run: ctest --build-config ${{ matrix.build_type }} |