@@ -18,45 +18,52 @@ jobs:
18
18
- { name: MacOS, os: macos-latest, shell: sh }
19
19
- { name: mingw-w64 (i686), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
20
20
- { name: mingw-w64 (x86_64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
21
- - { name: MSVC (x86), os: windows-latest, shell: pwsh, flags: "-DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake -A Win32", vcpkg: x86-windows }
22
- - { name: MSVC (x64), os: windows-latest, shell: pwsh, flags: "-DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake -A x64", vcpkg: x64-windows }
23
- - { name: MSVC (ARM64), os: windows-latest, shell: pwsh, flags: "-DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake -A ARM64", vcpkg: arm64-windows }
24
-
21
+ - { name: MSVC (x86), os: windows-latest, shell: pwsh, msvc: 1, msvc-arch: amd64_x86 }
22
+ - { name: MSVC (x64), os: windows-latest, shell: pwsh, msvc: 1, msvc-arch: amd64 }
23
+ - { name: MSVC (ARM64), os: windows-latest, shell: pwsh, msvc: 1, msvc-arch: amd64_arm64 }
24
+
25
25
steps :
26
+ - uses : ilammy/msvc-dev-cmd@v1
27
+ if : ${{ matrix.platform.msvc }}
28
+ with :
29
+ arch : ${{ matrix.platform.msvc-arch }}
26
30
- name : Setup Linux dependencies
27
31
if : runner.os == 'Linux'
28
32
run : |
29
33
sudo apt-get update
30
- sudo apt-get install cmake ninja-build libsdl2-dev
31
- - name : Setup MacOS dependencies
32
- if : runner.os == 'MacOS'
33
- run : |
34
- brew install sdl2
35
- - name : Set up MSYS2 dependencies
36
- if : matrix.platform.shell == 'msys2 {0}'
34
+ sudo apt-get install cmake ninja-build
35
+ - name : Set up MSYS2
36
+ if : ${{ matrix.platform.shell == 'msys2 {0}' }}
37
37
uses : msys2/setup-msys2@v2
38
38
with :
39
39
msystem : ${{ matrix.platform.msystem }}
40
40
install : >-
41
41
${{ matrix.platform.msys-env }}-gcc
42
42
${{ matrix.platform.msys-env }}-cmake
43
43
${{ matrix.platform.msys-env }}-ninja
44
- ${{ matrix.platform.msys-env }}-SDL2
45
- - name : Setup MSVC dependencies
46
- if : matrix.platform.vcpkg != ''
47
- run : |
48
- vcpkg install --triplet ${{ matrix.platform.vcpkg }} sdl2
49
-
44
+ - name : Set up Ninja
45
+ uses : aseprite/get-ninja@main
46
+ if : ${{ !contains(matrix.platform.shell, 'msys2') }}
47
+ - name : Set up SDL
48
+ id : sdl
49
+ uses : libsdl-org/setup-sdl@main
50
+ with :
51
+ cmake-generator : Ninja
52
+ version : 3-head
53
+ sdl-test : false
54
+ shell : ${{ matrix.platform.shell }}
50
55
- name : Get SDL_sound sources
51
56
uses : actions/checkout@v3
52
57
- name : Configure (CMake)
53
- run : cmake -B build -DSDLSOUND_DECODER_MIDI=ON ${{ matrix.platform.flags }} -DCMAKE_INSTALL_PREFIX=prefix -DCMAKE_BUILD_TYPE=Release
58
+ run : |
59
+ cmake -B build -DSDLSOUND_DECODER_MIDI=ON -GNinja -DCMAKE_INSTALL_PREFIX=prefix -DCMAKE_BUILD_TYPE=Release
54
60
- name : Build (CMake)
55
- run : cmake --build build/ --config Release
61
+ run : |
62
+ cmake --build build/ --config Release
56
63
- name : Install (CMake)
57
64
run : |
58
65
cmake --install build/ --config Release
59
66
- name : Verify CMake configuration files
60
67
run : |
61
- cmake -S cmake/test -B build_cmake_test ${{ matrix.platform.flags }} -DCMAKE_PREFIX_PATH="${{ github.workspace }}/prefix" -DCMAKE_BUILD_TYPE=Release
68
+ cmake -S cmake/test -B build_cmake_test -GNinja -DCMAKE_PREFIX_PATH="${{ github.workspace }}/prefix" -DCMAKE_BUILD_TYPE=Release
62
69
cmake --build build_cmake_test --verbose --config Release
0 commit comments