Fix many inconsistencies in GHA cmake script

This commit is contained in:
Jasmine Iwanek
2022-12-19 19:07:03 -05:00
parent 1ed1a5da3d
commit 5ef744ab2d
2 changed files with 72 additions and 48 deletions

View File

@@ -16,9 +16,9 @@ on:
jobs: jobs:
msys2: msys2:
name: MSYS2 Makefile (Win32 GUI, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }}) name: "Windows MSYS2 Makefile (Win32 GUI, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }})"
runs-on: windows-latest runs-on: windows-2022
defaults: defaults:
run: run:
@@ -50,28 +50,38 @@ jobs:
- msystem: MINGW64 - msystem: MINGW64
prefix: mingw-w64-x86_64 prefix: mingw-w64-x86_64
x64: y x64: y
- msystem: UCRT64
prefix: mingw-w64-ucrt-x86_64
x64: y
steps: steps:
- uses: msys2/setup-msys2@v2 - name: Prepare MSYS2 environment
with: uses: msys2/setup-msys2@v2
update: true with:
msystem: ${{ matrix.environment.msystem }} update: true
install: >- msystem: ${{ matrix.environment.msystem }}
make install: >-
${{ matrix.environment.prefix }}-gcc make
${{ matrix.environment.prefix }}-pkg-config ${{ matrix.environment.prefix }}-gcc
${{ matrix.environment.prefix }}-openal ${{ matrix.environment.prefix }}-pkg-config
${{ matrix.environment.prefix }}-freetype ${{ matrix.environment.prefix }}-freetype
${{ matrix.environment.prefix }}-SDL2 ${{ matrix.environment.prefix }}-SDL2
${{ matrix.environment.prefix }}-zlib ${{ matrix.environment.prefix }}-zlib
${{ matrix.environment.prefix }}-libpng ${{ matrix.environment.prefix }}-libpng
${{ matrix.environment.prefix }}-libvncserver ${{ matrix.environment.prefix }}-openal
${{ matrix.environment.prefix }}-rtmidi ${{ matrix.environment.prefix }}-rtmidi
- uses: actions/checkout@v3 ${{ matrix.environment.prefix }}-libvncserver
- name: make - uses: actions/checkout@v3
run: make -fwin/makefile.mingw -j DEV_BUILD=${{ matrix.build.dev }} DEBUG=${{ matrix.build.debug }} NEW_DYNAREC=${{ matrix.dynarec.new }} X64=${{ matrix.environment.x64 }} VNC=n - name: make
working-directory: ./src run: >-
- uses: actions/upload-artifact@v3 make -fwin/makefile.mingw -j
with: DEV_BUILD=${{ matrix.build.dev }}
name: '86Box${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-Windows-${{ matrix.environment.msystem }}-gha${{ github.run_number }}' DEBUG=${{ matrix.build.debug }}
path: src/86Box.exe NEW_DYNAREC=${{ matrix.dynarec.new }}
X64=${{ matrix.environment.x64 }}
VNC=n
working-directory: ./src
- uses: actions/upload-artifact@v3
with:
name: '86Box${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-Windows-${{ matrix.environment.msystem }}-gha${{ github.run_number }}'
path: src/86Box.exe

View File

@@ -25,7 +25,7 @@ on:
jobs: jobs:
msys2: msys2:
name: MSYS2 (${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }}) name: "Windows MSYS2 (${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }})"
runs-on: windows-2022 runs-on: windows-2022
@@ -73,14 +73,15 @@ jobs:
toolchain: ./cmake/flags-gcc-x86_64.cmake toolchain: ./cmake/flags-gcc-x86_64.cmake
steps: steps:
- uses: msys2/setup-msys2@v2 - name: Prepare MSYS2 environment
uses: msys2/setup-msys2@v2
with: with:
update: true update: true
msystem: ${{ matrix.environment.msystem }} msystem: ${{ matrix.environment.msystem }}
pacboy: >- pacboy: >-
ninja:p ninja:p
cmake:p cmake:p
cc:p gcc:p
pkg-config:p pkg-config:p
freetype:p freetype:p
SDL2:p SDL2:p
@@ -88,6 +89,7 @@ jobs:
libpng:p libpng:p
openal:p openal:p
rtmidi:p rtmidi:p
libvncserver:p
${{ matrix.ui.packages }} ${{ matrix.ui.packages }}
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Configure CMake - name: Configure CMake
@@ -98,6 +100,7 @@ jobs:
-D CMAKE_INSTALL_PREFIX=./build/artifacts -D CMAKE_INSTALL_PREFIX=./build/artifacts
-D QT=${{ matrix.ui.qt }} -D QT=${{ matrix.ui.qt }}
-D STATIC_BUILD=${{ matrix.ui.static }} -D STATIC_BUILD=${{ matrix.ui.static }}
-D VNC=n
- name: Build - name: Build
run: cmake --build build run: cmake --build build
- name: Generate package - name: Generate package
@@ -141,15 +144,15 @@ jobs:
target: target:
- name: x86 - name: x86
triplet: x86-windows-static triplet: x86-windows-static
toolchain: cmake/llvm-win32-i686.cmake toolchain: ./cmake/llvm-win32-i686.cmake
vcvars: x64_x86 vcvars: x64_x86
- name: x64 - name: x64
triplet: x64-windows-static triplet: x64-windows-static
toolchain: cmake/llvm-win32-x86_64.cmake toolchain: ./cmake/llvm-win32-x86_64.cmake
vcvars: x64 vcvars: x64
- name: ARM64 - name: ARM64
triplet: arm64-windows-static triplet: arm64-windows-static
toolchain: cmake/llvm-win32-aarch64.cmake toolchain: ./cmake/llvm-win32-aarch64.cmake
vcvars: x64_arm64 vcvars: x64_arm64
exclude: exclude:
- dynarec: - dynarec:
@@ -158,7 +161,6 @@ jobs:
name: ARM64 name: ARM64
steps: steps:
- uses: actions/checkout@v3
- name: Prepare VS environment - name: Prepare VS environment
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
with: with:
@@ -180,11 +182,13 @@ jobs:
-password "${{ secrets.GITHUB_TOKEN }}" -password "${{ secrets.GITHUB_TOKEN }}"
- name: Fix MSVC atomic headers - name: Fix MSVC atomic headers
run: dir "C:/Program Files/Microsoft Visual Studio/2022/*/VC/Tools/MSVC/*/include" -include stdatomic.h -recurse | del run: dir "C:/Program Files/Microsoft Visual Studio/2022/*/VC/Tools/MSVC/*/include" -include stdatomic.h -recurse | del
- uses: actions/checkout@v3
- name: Configure CMake - name: Configure CMake
run: > run: >
cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }}
--toolchain C:/vcpkg/scripts/buildsystems/vcpkg.cmake --toolchain C:/vcpkg/scripts/buildsystems/vcpkg.cmake
-D NEW_DYNAREC=${{ matrix.dynarec.new }} -D QT=${{ matrix.ui.qt }} -D NEW_DYNAREC=${{ matrix.dynarec.new }} -D QT=${{ matrix.ui.qt }}
-D CMAKE_INSTALL_PREFIX=./build/artifacts
-D VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${{ github.workspace }}/${{ matrix.target.toolchain }} -D VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${{ github.workspace }}/${{ matrix.target.toolchain }}
-D VCPKG_TARGET_TRIPLET=${{ matrix.target.triplet }} -D VCPKG_TARGET_TRIPLET=${{ matrix.target.triplet }}
-D VCPKG_HOST_TRIPLET=x64-windows -D VCPKG_HOST_TRIPLET=x64-windows
@@ -200,14 +204,14 @@ jobs:
- name: Build - name: Build
run: cmake --build build run: cmake --build build
- name: Generate package - name: Generate package
run: cmake --install build --prefix ./build/artifacts run: cmake --install build
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: '86Box${{ matrix.ui.slug }}${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-Windows-LLVM-${{ matrix.target.name }}-gha${{ github.run_number }}' name: '86Box${{ matrix.ui.slug }}${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-Windows-LLVM-${{ matrix.target.name }}-gha${{ github.run_number }}'
path: build/artifacts/** path: build/artifacts/**
linux: linux:
name: "Linux GCC 11 (${{ matrix.build.name }} ${{ matrix.dynarec.name }} x86_64)" name: "Linux GCC 11 (Qt GUI, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, x86_64)"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
@@ -230,7 +234,6 @@ jobs:
slug: -NDR slug: -NDR
steps: steps:
- uses: actions/checkout@v3
- name: Install dependencies - name: Install dependencies
run: >- run: >-
sudo apt update && sudo apt install sudo apt update && sudo apt install
@@ -244,22 +247,24 @@ jobs:
qtbase5-dev qtbase5-dev
qttools5-dev qttools5-dev
libopenal-dev libopenal-dev
- uses: actions/checkout@v3
- name: Configure CMake - name: Configure CMake
run: >- run: >-
cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }}
--toolchain ./cmake/flags-gcc-x86_64.cmake --toolchain ./cmake/flags-gcc-x86_64.cmake
-D NEW_DYNAREC=${{ matrix.dynarec.new }} -D NEW_DYNAREC=${{ matrix.dynarec.new }}
-D CMAKE_INSTALL_PREFIX=./build/artifacts
- name: Build - name: Build
run: cmake --build build run: cmake --build build
# - name: Generate package - name: Generate package
# run: cmake --install build --prefix ./build/artifacts run: cmake --install build
# - uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
# with: with:
# name: '86Box${{ matrix.build.slug }}-UbuntuJammy-x86_64-gha${{ github.run_number }}' name: '86Box-Qt${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-UbuntuJammy-x86_64-gha${{ github.run_number }}'
# path: build/artifacts/** path: build/artifacts/**
macos11: macos11:
name: "macOS 11 (${{ matrix.build.name }} x86_64)" name: "macOS 11 (Qt GUI, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, x86_64)"
runs-on: macos-11 runs-on: macos-11
@@ -282,22 +287,31 @@ jobs:
slug: -NDR slug: -NDR
steps: steps:
- uses: actions/checkout@v3
- name: Install dependencies - name: Install dependencies
run: brew install freetype sdl2 libpng rtmidi qt@5 openal-soft ninja run: >-
brew install
ninja
freetype
sdl2
libpng
rtmidi
qt@5
openal-soft
- uses: actions/checkout@v3
- name: Configure CMake - name: Configure CMake
run: >- run: >-
cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }}
--toolchain cmake/flags-gcc-x86_64.cmake --toolchain ./cmake/flags-gcc-x86_64.cmake
-D NEW_DYNAREC=${{ matrix.build.new-dynarec }} -D NEW_DYNAREC=${{ matrix.dynarec.new }}
-D CMAKE_INSTALL_PREFIX=./build/artifacts
-D Qt5_ROOT=$(brew --prefix qt@5) -D Qt5_ROOT=$(brew --prefix qt@5)
-D Qt5LinguistTools_ROOT=$(brew --prefix qt@5) -D Qt5LinguistTools_ROOT=$(brew --prefix qt@5)
-D OpenAL_ROOT=$(brew --prefix openal-soft) -D OpenAL_ROOT=$(brew --prefix openal-soft)
- name: Build - name: Build
run: cmake --build build run: cmake --build build
- name: Generate package - name: Generate package
run: cmake --install build --prefix ./build/artifacts run: cmake --install build
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: '86Box${{ matrix.build.slug }}-macOS-x86_64-gha${{ github.run_number }}' name: '86Box-Qt${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-macOS-x86_64-gha${{ github.run_number }}'
path: build/artifacts/** path: build/artifacts/**