diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9144a71ac..017dcd1ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,138 +1,138 @@ name: Build concurrency: - group: build-${{ github.head_ref }} - cancel-in-progress: true + group: build-${{ github.head_ref }} + cancel-in-progress: true on: - push: - branches: - - master - pull_request: - branches: - - master - workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: jobs: - # Build job for Ubuntu - build-ubuntu: - strategy: - fail-fast: false - matrix: - include: - - name: Ubuntu 22-04 GCC - image: ubuntu-22.04 - cc: gcc - cxx: g++ - build-type: Debug - experimental: false - - name: Ubuntu 22-04 Clang - image: ubuntu-22.04 - cc: clang - cxx: clang++ - build-type: Debug - experimental: true - - name: Ubuntu 20-04 GCC (for AppImage comp) - image: ubuntu-20.04 - cc: gcc - cxx: g++ - build-type: Debug - experimental: false - - name: ${{ matrix.name }} ${{ matrix.build-type }} - runs-on: ${{ matrix.image }} - continue-on-error: ${{ matrix.experimental }} - - steps: - - uses: actions/checkout@v3 - - - name: Install Dependencies - run: sudo apt-get update && sudo apt-get install extra-cmake-modules qttools5-dev qttools5-dev-tools libsdl2-dev libxi-dev libxtst-dev libx11-dev itstool gettext ninja-build - - - name: Configure CMake - run: cmake -GNinja -DCHECK_FOR_UPDATES=ON -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -B ${{ github.workspace }}/build - env: - CXX: ${{ matrix.cxx }} - CC: ${{ matrix.cc }} - - - name: Build AntiMicroX - run: cmake --build ${{ github.workspace }}/build - - # Build job for Windows - build-windows: - strategy: - fail-fast: false - matrix: - include: - - name: Windows Server 2019 MinGW - image: windows-2019 - shell: msys2 {0} - build-type: Debug - qt-arch: "win64_mingw81" - experimental: false - - name: Windows Server 2019 MSVC - image: windows-2019 - shell: cmd - cmake-args: -G "Visual Studio 16 2019" "-DSDL2_PATH=%WORKSPACE_DIR%/sdl2/" "-DSDL2_LIBRARY=%WORKSPACE_DIR%/sdl2/lib/x64/SDL2.lib" "-DSDL2_INCLUDE_DIR=%WORKSPACE_DIR%/sdl2/" "-DSDL2_DLL_LOCATION_DIR=%WORKSPACE_DIR%/sdl2/lib/x64/SDL2.dll" - build-type: Debug - qt-arch: "win64_msvc2019_64" - experimental: false - name: ${{ matrix.name }} ${{ matrix.build-type }} - runs-on: ${{ matrix.image }} - continue-on-error: ${{ matrix.experimental }} - defaults: - run: - shell: ${{ matrix.shell }} - - steps: - - uses: actions/checkout@v3 - - - name: Install Dependencies (msys2) - if: startsWith(matrix.shell, 'msys2') - uses: msys2/setup-msys2@v2 - with: - install: >- - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-ninja - msystem: mingw64 - release: false - #mingw-w64-x86_64-SDL2 not installed above because of: https://github.com/AntiMicroX/antimicrox/issues/465 - - name: Install sdl2 (mingw-w64) - if: startsWith(matrix.shell, 'msys2') - run: | - curl -L -o mingw-w64-x86_64-SDL2-2.30.0-1-any.pkg.tar.zst https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-SDL2-2.30.0-1-any.pkg.tar.zst - pacman --noconfirm -U mingw-w64-x86_64-SDL2-2.30.0-1-any.pkg.tar.zst - - - name: Install sdl2 (msvc) - if: startsWith(matrix.shell, 'cmd') - run: | - curl -L -o SDL2-devel-2.30.0-VC.zip https://github.com/libsdl-org/SDL/releases/download/release-2.30.0/SDL2-devel-2.30.0-VC.zip - unzip SDL2-devel-2.30.0-VC.zip - mv "${{ github.workspace }}/SDL2-2.30.0" "${{ github.workspace }}/sdl2" - mklink /J "${{ github.workspace }}\sdl2\SDL2" "${{ github.workspace }}\sdl2\include" - - - name: Install MSVC - if: startsWith(matrix.shell, 'cmd') - uses: TheMrMilchmann/setup-msvc-dev@v2 - with: - arch: x64 - toolset: 14.1 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: "5.15.2" - host: "windows" - target: "desktop" - arch: ${{ matrix.qt-arch }} - dir: "${{ github.workspace }}/qt/" - install-deps: "true" - - - name: Configure CMake - run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -B "${{ github.workspace }}/build" ${{ matrix.cmake-args }} - env: - CMAKE_PREFIX_PATH: ${{ env.Qt5_Dir }} - WORKSPACE_DIR: ${{ github.workspace }} - - - name: Build - run: cmake --build "${{ github.workspace }}/build" --parallel 8 + # Build job for Ubuntu + build-ubuntu: + strategy: + fail-fast: false + matrix: + include: + - name: Ubuntu 22-04 GCC + image: ubuntu-22.04 + cc: gcc + cxx: g++ + build-type: Debug + experimental: false + - name: Ubuntu 22-04 Clang + image: ubuntu-22.04 + cc: clang + cxx: clang++ + build-type: Debug + experimental: true + - name: Ubuntu 20-04 GCC (for AppImage comp) + image: ubuntu-20.04 + cc: gcc + cxx: g++ + build-type: Debug + experimental: false + + name: ${{ matrix.name }} ${{ matrix.build-type }} + runs-on: ${{ matrix.image }} + continue-on-error: ${{ matrix.experimental }} + + steps: + - uses: actions/checkout@v3 + + - name: Install Dependencies + run: sudo apt-get update && sudo apt-get install extra-cmake-modules qttools5-dev qttools5-dev-tools libsdl2-dev libxi-dev libxtst-dev libx11-dev itstool gettext ninja-build + + - name: Configure CMake + run: cmake -GNinja -DCHECK_FOR_UPDATES=ON -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -B ${{ github.workspace }}/build + env: + CXX: ${{ matrix.cxx }} + CC: ${{ matrix.cc }} + + - name: Build AntiMicroX + run: cmake --build ${{ github.workspace }}/build + + # Build job for Windows + build-windows: + strategy: + fail-fast: false + matrix: + include: + - name: Windows Server 2019 MinGW + image: windows-2019 + shell: msys2 {0} + build-type: Debug + qt-arch: "win64_mingw81" + experimental: false + - name: Windows Server 2019 MSVC + image: windows-2019 + shell: cmd + cmake-args: -G "Visual Studio 16 2019" "-DSDL2_PATH=%WORKSPACE_DIR%/sdl2/" "-DSDL2_LIBRARY=%WORKSPACE_DIR%/sdl2/lib/x64/SDL2.lib" "-DSDL2_INCLUDE_DIR=%WORKSPACE_DIR%/sdl2/" "-DSDL2_DLL_LOCATION_DIR=%WORKSPACE_DIR%/sdl2/lib/x64/SDL2.dll" + build-type: Debug + qt-arch: "win64_msvc2019_64" + experimental: false + name: ${{ matrix.name }} ${{ matrix.build-type }} + runs-on: ${{ matrix.image }} + continue-on-error: ${{ matrix.experimental }} + defaults: + run: + shell: ${{ matrix.shell }} + + steps: + - uses: actions/checkout@v3 + + - name: Install Dependencies (msys2) + if: startsWith(matrix.shell, 'msys2') + uses: msys2/setup-msys2@v2 + with: + install: >- + mingw-w64-x86_64-toolchain + mingw-w64-x86_64-ninja + msystem: mingw64 + release: false + #mingw-w64-x86_64-SDL2 not installed above because of: https://github.com/AntiMicroX/antimicrox/issues/465 + - name: Install sdl2 (mingw-w64) + if: startsWith(matrix.shell, 'msys2') + run: | + curl -L -o mingw-w64-x86_64-SDL2-2.30.1-1-any.pkg.tar.zst https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-SDL2-2.30.1-1-any.pkg.tar.zst + pacman --noconfirm -U mingw-w64-x86_64-SDL2-2.30.1-1-any.pkg.tar.zst + + - name: Install sdl2 (msvc) + if: startsWith(matrix.shell, 'cmd') + run: | + curl -L -o SDL2-devel-2.30.1-VC.zip https://github.com/libsdl-org/SDL/releases/download/release-2.30.1/SDL2-devel-2.30.1-VC.zip + unzip SDL2-devel-2.30.1-VC.zip + mv "${{ github.workspace }}/SDL2-2.30.1" "${{ github.workspace }}/sdl2" + mklink /J "${{ github.workspace }}\sdl2\SDL2" "${{ github.workspace }}\sdl2\include" + + - name: Install MSVC + if: startsWith(matrix.shell, 'cmd') + uses: TheMrMilchmann/setup-msvc-dev@v2 + with: + arch: x64 + toolset: 14.1 + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: "5.15.2" + host: "windows" + target: "desktop" + arch: ${{ matrix.qt-arch }} + dir: "${{ github.workspace }}/qt/" + install-deps: "true" + + - name: Configure CMake + run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -B "${{ github.workspace }}/build" ${{ matrix.cmake-args }} + env: + CMAKE_PREFIX_PATH: ${{ env.Qt5_Dir }} + WORKSPACE_DIR: ${{ github.workspace }} + + - name: Build + run: cmake --build "${{ github.workspace }}/build" --parallel 8 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3201df367..096d0ced3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,190 +1,189 @@ name: Release on: - release: - types: [published] + release: + types: [published] jobs: - # Build .deb files for debian-based systems. - build_deb: - strategy: - fail-fast: false - matrix: - include: - - name: Ubuntu 22-04 - image: ubuntu-22.04 - - name: Ubuntu 20-04 - image: ubuntu-20.04 - name: Build deb package ${{ matrix.name }} - runs-on: ${{ matrix.image }} - - steps: - - uses: actions/checkout@v3 - - - name: Install Dependencies - run: sudo apt-get update && sudo apt-get install extra-cmake-modules qttools5-dev qttools5-dev-tools libsdl2-dev libxi-dev libxtst-dev libx11-dev itstool gettext - - - name: Configure CMake - run: cmake -DCPACK_GENERATOR="DEB" -DCMAKE_BUILD_TYPE=Release -DCHECK_FOR_UPDATES=ON -DANTIMICROX_PKG_VERSION="GitHub Release" -B ${{ github.workspace }}/build - - - name: Create Deb package - id: create_deb - run: cmake --build ${{ github.workspace }}/build --parallel 8 --target package - - - name: Rename deb files - id: rename_debs - run: | - FILE=`find ${{ github.workspace }}/build/*.deb` - NEWFILE=`echo $FILE | sed 's/x86_64/${{ matrix.image }}-x86_64/'` - mv $FILE $NEWFILE - - # Upload generated files to release - - name: Upload binaries to release - uses: AButler/upload-release-assets@v2.0 - with: - files: ${{ github.workspace }}/build/*.deb - repo-token: ${{ github.token }} - - # Build universal and portable AppImage package. - build-appimage: - # Version of ubuntu building this appimage, it shouldn't be the latest verion of ubuntu to avoid breaking compatibility with older systems - name: Build AppImage package - runs-on: ubuntu-20.04 - - steps: - - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install extra-cmake-modules qttools5-dev qttools5-dev-tools libsdl2-dev libxi-dev libxtst-dev libx11-dev itstool gettext qt5-default zsync - - #Replace original library with the newer one - - name: Build and install newer SDL2 - run: | - git clone https://github.com/libsdl-org/SDL.git -b release-2.30.0 - cd SDL - mkdir build - cd build - cmake .. - cmake --build . - sudo cmake --install . - sudo cp /usr/local/lib/libSDL2-2.0.so.0 /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 - - - uses: actions/checkout@v3 - - - name: Prepare files needed to create AppImage - run: | - mkdir build && cd ./build - wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage - wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage - wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage - chmod +x linuxdeploy-x86_64.AppImage - chmod +x appimagetool-x86_64.AppImage - chmod +x linuxdeploy-plugin-qt-x86_64.AppImage - - - name: Build AntiMicroX - run: | - VERSION=`cat ./CMakeLists.txt | grep "set(ANTIMICROX_" | grep _VERSION | cut -d " " -f 2 | cut -d ")" -f 1` - MAJOR=`echo $VERSION | cut -d " " -f 1` - MINOR=`echo $VERSION | cut -d " " -f 2` - PATCH=`echo $VERSION | cut -d " " -f 3` - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DANTIMICROX_PKG_VERSION="$MAJOR.$MINOR.$PATCH-x86_64 \(AppImage\)" - make install DESTDIR=AppDir -j8 - - # UPDATE_INFORMATION describes where information about updates can be found - - name: Create AppImage file - run: | - cd build - export UPDATE_INFORMATION="zsync|https://github.com/$GITHUB_REPOSITORY/releases/latest/download/antimicrox-x86_64.AppImage.zsync" - ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt - ./appimagetool-x86_64.AppImage AppDir/ -u "$UPDATE_INFORMATION" - - # Upload generated files to release - - name: Upload binaries to release - uses: AButler/upload-release-assets@v2.0 - with: - files: ./build/AntiMicroX*.AppImage;./build/AntiMicroX*.zsync - repo-token: ${{ github.token }} - - - name: Build AntiMicroX-debug - run: | - VERSION=`cat ./CMakeLists.txt | grep "set(ANTIMICROX_" | grep _VERSION | cut -d " " -f 2 | cut -d ")" -f 1` - MAJOR=`echo $VERSION | cut -d " " -f 1` - MINOR=`echo $VERSION | cut -d " " -f 2` - PATCH=`echo $VERSION | cut -d " " -f 3` - cd build - cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr -DANTIMICROX_PKG_VERSION="$MAJOR.$MINOR.$PATCH-debug-x86_64 \(AppImage-debug\)" - make install DESTDIR=AppDir -j8 - - - name: Create AppImage debug file - run: | - cd build - ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt - ./appimagetool-x86_64.AppImage AppDir/ - mv AntiMicroX-x86_64.AppImage AntiMicroX-debug-x86_64.AppImage - - # Upload generated files to release - - name: Upload binaries to release - uses: AButler/upload-release-assets@v2.0 - with: - files: ./build/AntiMicroX*.AppImage - repo-token: ${{ github.token }} - - build-windows-packages: - name: Create Windows packages - runs-on: windows-2019 - defaults: - run: - shell: msys2 {0} - - steps: - - uses: actions/checkout@v3 - - - name: Install Dependencies - uses: msys2/setup-msys2@v2 - with: - install: >- - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-ninja - mingw-w64-x86_64-nsis - mingw-w64-x86_64-openssl - msystem: mingw64 - release: false - # mingw-w64-x86_64-SDL2 not installed above because of: https://github.com/AntiMicroX/antimicrox/issues/465 - # SDL2 version for release locked - - name: Install sdl2 - run: | - curl -L -o mingw-w64-x86_64-SDL2-2.30.0-1-any.pkg.tar.zst https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-SDL2-2.30.0-1-any.pkg.tar.zst - pacman --noconfirm -U mingw-w64-x86_64-SDL2-2.30.0-1-any.pkg.tar.zst - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: "5.15.2" - host: "windows" - target: "desktop" - arch: "win64_mingw81" - dir: "${{ github.workspace }}/qt/" - install-deps: "true" - - - name: Configure CMake - run: cmake -DCMAKE_BUILD_TYPE=Release -DCHECK_FOR_UPDATES=ON -DANTIMICROX_PKG_VERSION="GitHub Windows Release" -B '${{ github.workspace }}'/build - env: - CMAKE_PREFIX_PATH: ${{env.Qt5_Dir}} - - - name: Build Installer - run: cmake --build '${{ github.workspace }}'/build --target package --parallel 8 - - - name: Configure CMake (portable) - run: cmake -DCMAKE_BUILD_TYPE=Release -DCHECK_FOR_UPDATES=ON -DANTIMICROX_PKG_VERSION="GitHub Portable Windows Release" -DPORTABLE_WIN=ON -B '${{ github.workspace }}'/build - env: - CMAKE_PREFIX_PATH: ${{env.Qt5_Dir}} - - - name: Build ZIP Package - run: cmake --build '${{ github.workspace }}'/build --target package --parallel 8 - - - name: Upload binaries to release - uses: AButler/upload-release-assets@v2.0 - with: - files: build/antimicrox*.exe;build/antimicrox*.zip - repo-token: ${{ github.token }} + # Build .deb files for debian-based systems. + build_deb: + strategy: + fail-fast: false + matrix: + include: + - name: Ubuntu 22-04 + image: ubuntu-22.04 + - name: Ubuntu 20-04 + image: ubuntu-20.04 + name: Build deb package ${{ matrix.name }} + runs-on: ${{ matrix.image }} + + steps: + - uses: actions/checkout@v3 + + - name: Install Dependencies + run: sudo apt-get update && sudo apt-get install extra-cmake-modules qttools5-dev qttools5-dev-tools libsdl2-dev libxi-dev libxtst-dev libx11-dev itstool gettext + + - name: Configure CMake + run: cmake -DCPACK_GENERATOR="DEB" -DCMAKE_BUILD_TYPE=Release -DCHECK_FOR_UPDATES=ON -DANTIMICROX_PKG_VERSION="GitHub Release" -B ${{ github.workspace }}/build + + - name: Create Deb package + id: create_deb + run: cmake --build ${{ github.workspace }}/build --parallel 8 --target package + + - name: Rename deb files + id: rename_debs + run: | + FILE=`find ${{ github.workspace }}/build/*.deb` + NEWFILE=`echo $FILE | sed 's/x86_64/${{ matrix.image }}-x86_64/'` + mv $FILE $NEWFILE + + # Upload generated files to release + - name: Upload binaries to release + uses: AButler/upload-release-assets@v2.0 + with: + files: ${{ github.workspace }}/build/*.deb + repo-token: ${{ github.token }} + + # Build universal and portable AppImage package. + build-appimage: + # Version of ubuntu building this appimage, it shouldn't be the latest verion of ubuntu to avoid breaking compatibility with older systems + name: Build AppImage package + runs-on: ubuntu-20.04 + + steps: + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install extra-cmake-modules qttools5-dev qttools5-dev-tools libsdl2-dev libxi-dev libxtst-dev libx11-dev itstool gettext qt5-default zsync + + #Replace original library with the newer one + - name: Build and install newer SDL2 + run: | + git clone https://github.com/libsdl-org/SDL.git -b release-2.30.1 + cd SDL + mkdir build + cd build + cmake .. + cmake --build . + sudo cmake --install . + sudo cp /usr/local/lib/libSDL2-2.0.so.0 /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 + + - uses: actions/checkout@v3 + + - name: Prepare files needed to create AppImage + run: | + mkdir build && cd ./build + wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage + wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage + chmod +x linuxdeploy-x86_64.AppImage + chmod +x appimagetool-x86_64.AppImage + chmod +x linuxdeploy-plugin-qt-x86_64.AppImage + + - name: Build AntiMicroX + run: | + VERSION=`cat ./CMakeLists.txt | grep "set(ANTIMICROX_" | grep _VERSION | cut -d " " -f 2 | cut -d ")" -f 1` + MAJOR=`echo $VERSION | cut -d " " -f 1` + MINOR=`echo $VERSION | cut -d " " -f 2` + PATCH=`echo $VERSION | cut -d " " -f 3` + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DANTIMICROX_PKG_VERSION="$MAJOR.$MINOR.$PATCH-x86_64 \(AppImage\)" + make install DESTDIR=AppDir -j8 + + # UPDATE_INFORMATION describes where information about updates can be found + - name: Create AppImage file + run: | + cd build + export UPDATE_INFORMATION="zsync|https://github.com/$GITHUB_REPOSITORY/releases/latest/download/antimicrox-x86_64.AppImage.zsync" + ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt + ./appimagetool-x86_64.AppImage AppDir/ -u "$UPDATE_INFORMATION" + + # Upload generated files to release + - name: Upload binaries to release + uses: AButler/upload-release-assets@v2.0 + with: + files: ./build/AntiMicroX*.AppImage;./build/AntiMicroX*.zsync + repo-token: ${{ github.token }} + + - name: Build AntiMicroX-debug + run: | + VERSION=`cat ./CMakeLists.txt | grep "set(ANTIMICROX_" | grep _VERSION | cut -d " " -f 2 | cut -d ")" -f 1` + MAJOR=`echo $VERSION | cut -d " " -f 1` + MINOR=`echo $VERSION | cut -d " " -f 2` + PATCH=`echo $VERSION | cut -d " " -f 3` + cd build + cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr -DANTIMICROX_PKG_VERSION="$MAJOR.$MINOR.$PATCH-debug-x86_64 \(AppImage-debug\)" + make install DESTDIR=AppDir -j8 + + - name: Create AppImage debug file + run: | + cd build + ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt + ./appimagetool-x86_64.AppImage AppDir/ + mv AntiMicroX-x86_64.AppImage AntiMicroX-debug-x86_64.AppImage + + # Upload generated files to release + - name: Upload binaries to release + uses: AButler/upload-release-assets@v2.0 + with: + files: ./build/AntiMicroX*.AppImage + repo-token: ${{ github.token }} + + build-windows-packages: + name: Create Windows packages + runs-on: windows-2019 + defaults: + run: + shell: msys2 {0} + + steps: + - uses: actions/checkout@v3 + + - name: Install Dependencies + uses: msys2/setup-msys2@v2 + with: + install: >- + mingw-w64-x86_64-toolchain + mingw-w64-x86_64-ninja + mingw-w64-x86_64-nsis + mingw-w64-x86_64-openssl + msystem: mingw64 + release: false + # mingw-w64-x86_64-SDL2 not installed above because of: https://github.com/AntiMicroX/antimicrox/issues/465 + # SDL2 version for release locked + - name: Install sdl2 + run: | + curl -L -o mingw-w64-x86_64-SDL2-2.30.1-1-any.pkg.tar.zst https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-SDL2-2.30.1-1-any.pkg.tar.zst + pacman --noconfirm -U mingw-w64-x86_64-SDL2-2.30.1-1-any.pkg.tar.zst + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: "5.15.2" + host: "windows" + target: "desktop" + arch: "win64_mingw81" + dir: "${{ github.workspace }}/qt/" + install-deps: "true" + + - name: Configure CMake + run: cmake -DCMAKE_BUILD_TYPE=Release -DCHECK_FOR_UPDATES=ON -DANTIMICROX_PKG_VERSION="GitHub Windows Release" -B '${{ github.workspace }}'/build + env: + CMAKE_PREFIX_PATH: ${{env.Qt5_Dir}} + + - name: Build Installer + run: cmake --build '${{ github.workspace }}'/build --target package --parallel 8 + + - name: Configure CMake (portable) + run: cmake -DCMAKE_BUILD_TYPE=Release -DCHECK_FOR_UPDATES=ON -DANTIMICROX_PKG_VERSION="GitHub Portable Windows Release" -DPORTABLE_WIN=ON -B '${{ github.workspace }}'/build + env: + CMAKE_PREFIX_PATH: ${{env.Qt5_Dir}} + + - name: Build ZIP Package + run: cmake --build '${{ github.workspace }}'/build --target package --parallel 8 + + - name: Upload binaries to release + uses: AButler/upload-release-assets@v2.0 + with: + files: build/antimicrox*.exe;build/antimicrox*.zip + repo-token: ${{ github.token }}