@@ -19,15 +19,19 @@ jobs:
19
19
fail-fast : false
20
20
matrix :
21
21
platform :
22
- - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, artifact: 'SDL-mingw32' }
23
- - { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64, artifact: 'SDL-mingw64' }
24
- - { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, artifact: 'SDL-msys2-clang32' }
25
- - { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64, artifact: 'SDL-msys2-clang64' }
26
- - { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64, artifact: 'SDL-msys2-ucrt64' }
27
- - { name: Ubuntu 20.04, os: ubuntu-20.04, shell: sh, artifact: 'SDL-ubuntu20.04' }
28
- - { name: Ubuntu 22.04, os: ubuntu-22.04, shell: sh, artifact: 'SDL-ubuntu22.04' }
29
- - { name: MacOS (Framework), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DSDL_FRAMEWORK=ON -DSDL_CLANG_TIDY=OFF', skip_test_pkgconfig: true, artifact: 'SDL-macos-framework' }
30
- - { name: MacOS (GNU prefix), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64" -DCLANG_TIDY_BINARY="$(brew --prefix llvm)/bin/clang-tidy"', artifact: 'SDL-macos-gnu' }
22
+ - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, artifact: 'SDL-mingw32' }
23
+ - { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64, artifact: 'SDL-mingw64' }
24
+ - { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, artifact: 'SDL-msys2-clang32' }
25
+ - { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64, artifact: 'SDL-msys2-clang64' }
26
+ - { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64, artifact: 'SDL-msys2-ucrt64' }
27
+ - { name: Ubuntu 20.04, os: ubuntu-20.04, shell: sh, artifact: 'SDL-ubuntu20.04' }
28
+ - { name: Intel oneAPI (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-oneapi', intel: true,
29
+ source_cmd : ' source /opt/intel/oneapi/setvars.sh; export CC=icx; export CXX=icx;' }
30
+ - { name: Intel Compiler (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-icc', intel: true, cmake: '-DSDL_CLANG_TIDY=OFF',
31
+ source_cmd : ' source /opt/intel/oneapi/setvars.sh; export CC=icc; export CXX=icpc; export CFLAGS=-diag-disable=10441; export CXXFLAGS=-diag-disable=10441; ' }
32
+ - { name: Ubuntu 22.04, os: ubuntu-22.04, shell: sh, artifact: 'SDL-ubuntu22.04' }
33
+ - { name: MacOS (Framework), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DSDL_FRAMEWORK=ON -DSDL_CLANG_TIDY=OFF', skip_test_pkgconfig: true, artifact: 'SDL-macos-framework' }
34
+ - { name: MacOS (GNU prefix), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64" -DCLANG_TIDY_BINARY="$(brew --prefix llvm)/bin/clang-tidy"', artifact: 'SDL-macos-gnu' }
31
35
32
36
steps :
33
37
- name : Set up MSYS2
@@ -65,13 +69,27 @@ jobs:
65
69
ninja \
66
70
pkg-config \
67
71
llvm
72
+
73
+ - name : Setup Intel oneAPI
74
+ if : matrix.platform.intel
75
+ run : |
76
+ # Setup oneAPI repo
77
+ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
78
+ sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
79
+ sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
80
+ sudo apt-get update -y
81
+
82
+ # Install oneAPI
83
+ sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
84
+
68
85
- uses : actions/checkout@v3
69
86
- name : Check that versioning is consistent
70
87
# We only need to run this once: arbitrarily use the Linux/CMake build
71
88
if : " runner.os == 'Linux'"
72
89
run : ./build-scripts/test-versioning.sh
73
90
- name : Configure (CMake)
74
91
run : |
92
+ ${{ matrix.platform.source_cmd }}
75
93
cmake -S . -B build -G Ninja \
76
94
-Wdeprecated -Wdev -Werror \
77
95
-DSDL_SHARED=ON \
@@ -86,10 +104,12 @@ jobs:
86
104
${{ matrix.platform.cmake }}
87
105
- name : Build (CMake)
88
106
run : |
107
+ ${{ matrix.platform.source_cmd }}
89
108
cmake --build build/ --config Release --verbose --parallel
90
109
- name : Run build-time tests (CMake)
91
110
run : |
92
111
set -eu
112
+ ${{ matrix.platform.source_cmd }}
93
113
export SDL_TESTS_QUICK=1
94
114
ctest -VV --test-dir build/
95
115
if test "${{ runner.os }}" = "Linux"; then
@@ -99,13 +119,15 @@ jobs:
99
119
- name : Install (CMake)
100
120
run : |
101
121
set -eu
122
+ ${{ matrix.platform.source_cmd }}
102
123
cmake --install build/ --config Release
103
124
( cd cmake_prefix; find . ) | LC_ALL=C sort -u
104
125
- name : Package (CPack)
105
126
run : |
106
127
cmake --build build/ --config Release --target package
107
128
- name : Verify CMake configuration files
108
129
run : |
130
+ ${{ matrix.platform.source_cmd }}
109
131
cmake -S cmake/test -B cmake_config_build -G Ninja \
110
132
-DTEST_SHARED=ON \
111
133
-DTEST_STATIC=ON \
@@ -115,6 +137,7 @@ jobs:
115
137
- name : Verify sdl3.pc
116
138
if : ${{ !matrix.platform.skip_test_pkgconfig }}
117
139
run : |
140
+ ${{ matrix.platform.source_cmd }}
118
141
export PKG_CONFIG_PATH=$(echo "${{ github.workspace }}/cmake_prefix/lib/pkgconfig" | sed -e 's#\\#/#g')
119
142
cmake/test/test_pkgconfig.sh
120
143
- uses : actions/upload-artifact@v3
0 commit comments