From c123a234ae517d435e8206bca31aa11575b1e221 Mon Sep 17 00:00:00 2001 From: Violet Giraffe Date: Fri, 22 Mar 2024 01:53:40 +0200 Subject: [PATCH] Github action --- .github/workflows/CI.yml | 99 ++++++++++++++++++++++++++++++++++++++++ appveyor.yml | 15 ------ 2 files changed, 99 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/CI.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..aaf7804 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,99 @@ +name: CI + +on: [push, pull_request, workflow_dispatch] + +env: + # Path to the solution file relative to the root of the project. + SOLUTION_FILE_PATH: . + + # Configuration type to build. + # You can convert this to a build matrix if you need coverage of multiple configuration types. + # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + BUILD_CONFIGURATION: Release + +jobs: + build: + name: Build & test on ${{ matrix.os }} with ${{ matrix.compiler }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] # TODO: macos-12, windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Checkout subrepos + if: "!startsWith(matrix.os, 'windows')" + run: ./update_repository.sh + + - name: Checkout subrepos + if: "startsWith(matrix.os, 'windows')" + shell: cmd + run: update_repository.bat + + - name: Install Qt + if: "startsWith(matrix.os, 'windows')" + uses: jurplel/install-qt-action@v3 + with: + version: '6.6.2' + arch: 'win64_msvc2019_64' + archives: 'qtbase icu qtsvg' + modules: 'qt5compat qtimageformats' + + - name: Install Qt + if: "startsWith(matrix.os, 'ubuntu')" + uses: jurplel/install-qt-action@v3 + with: + version: '6.6.2' + arch: 'gcc_64' + archives: 'qtbase icu qtsvg' + modules: 'qt5compat qtimageformats' + + + - name: Install Qt + if: "startsWith(matrix.os, 'macos')" + uses: jurplel/install-qt-action@v3 + with: + version: '6.6.2' + arch: 'clang_64' + archives: 'qtbase icu qtsvg' + modules: 'qt5compat qtimageformats' + + - name: Windows - setup MSBuild + if: startsWith(matrix.os, 'windows') + uses: microsoft/setup-msbuild@v1 + + - name: Windows - building main installer + if: startsWith(matrix.os, 'windows') + shell: cmd + run: | + %Qt6_DIR%\bin\qmake.exe -v + set QTDIR64=%Qt6_DIR% + cd installer\ + create_installer.bat + cd ..\.. + xcopy /R /Y .\installer\windows\binaries\64\msvcr\* .\bin\release\x64\ + xcopy /R /Y .\installer\windows\binaries\64\Qt\* .\bin\release\x64\ + + - name: Mac + if: startsWith(matrix.os, 'macos') + working-directory: ${{env.GITHUB_WORKSPACE}} + run: | + clang --version + ./installer/mac/create_dmg.sh $Qt6_DIR + + - name: Linux + if: startsWith(matrix.os, 'ubuntu') + working-directory: ${{env.GITHUB_WORKSPACE}} + run: | + export QT_DEBUG_PLUGINS=1 + sudo apt update -y; sudo apt install -qq gcc-12 g++-12 libglu1-mesa-dev libx11-xcb-dev '^libxcb*' '^libxkb*' libfuse2 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 50 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 50 + g++ --version + export PATH=$Qt6_DIR/bin/:$PATH + unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH + $Qt6_DIR/bin/qmake -r CONFIG+=release + make -j \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index fc51603..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: 1.0.{build} -environment: - matrix: - - qt: 5.7\msvc2013 - - qt: 5.7\msvc2013_64 - - qt: 5.7\msvc2015 - - qt: 5.7\msvc2015_64 - -install: -- git submodule update --init --recursive -- set PATH=C:\Qt\%qt%\bin;%PATH%; -- qmake.exe -tp vc -r -build: - parallel: true - verbosity: minimal \ No newline at end of file