diff --git a/.github/workflows/cmake-sdl2.yml b/.github/workflows/cmake-sdl2.yml index c088883..e6e5d32 100644 --- a/.github/workflows/cmake-sdl2.yml +++ b/.github/workflows/cmake-sdl2.yml @@ -10,18 +10,25 @@ jobs: include: - os: ubuntu-latest arch: x86_64 + cmake-arch: x64 - os: ubuntu-latest arch: arm64 + cmake-arch: aarch64 - os: windows-latest arch: x86_64 + cmake-arch: x64 - os: windows-latest arch: x86 + cmake-arch: win32 - os: windows-latest arch: arm64 + cmake-arch: arm64 - os: macos-latest arch: x86_64 + cmake-arch: x86_64 - os: macos-latest arch: arm64 + cmake-arch: arm64 steps: - uses: actions/checkout@v4.1.7 with: @@ -66,24 +73,26 @@ jobs: libxkbcommon-dev \ libsndio-dev - - name: Install dependencies on macOS - if: matrix.os == 'macos-latest' + - name: Install Cross-Compilation Tools for ARM64 + if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64' run: | - brew update - brew install cmake + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - - name: Install dependencies on Windows - if: matrix.os == 'windows-latest' - run: | - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' + - name: Configure cimgui with CMake for ARM64 on Linux + if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64' + run: cmake -S SDL -B SDL/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ + + - name: Configure cimgui with CMake on Linux (x86_64) + if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64' + run: cmake -S SDL -B SDL/build - name: Configure SDL2 with CMake for macOS ARM64 - if: matrix.arch == 'arm64' && matrix.os == 'macos-latest' - run: cmake -S SDL -B SDL/build -DCMAKE_OSX_ARCHITECTURES=arm64 -DSDL_STATIC=OFF -DSDL_SHARED=ON + if: matrix.os == 'macos-latest' + run: cmake -S SDL -B SDL/build -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DSDL_STATIC=OFF -DSDL_SHARED=ON - - name: Configure SDL2 with CMake - if: matrix.arch != 'arm64' || matrix.os != 'macos-latest' - run: cmake -S SDL -B SDL/build -DSDL_STATIC=OFF -DSDL_SHARED=ON + - name: Configure cimgui with CMake for Windows + if: matrix.os == 'windows-latest' + run: cmake -S SDL -B SDL/build -A ${{ matrix.cmake-arch }} - name: Build SDL2 run: cmake --build SDL/build --config Release @@ -91,7 +100,7 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v4.3.4 with: - name: ${{ matrix.os }}-${{ matrix.arch }}-artifacts + name: sdl2-${{ matrix.os }}-${{ matrix.arch }}-artifacts path: | SDL/build/Release/*.dll SDL/build/*.so