Merge pull request #28 from Inokinoki/fix-freebsd-build #133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows x86/x64 | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# TODO: use matrix to build both x86 and x64 | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
name: Build | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
qtvers: ['5.15.2', '6.2.0'] | |
steps: | |
- name: Cache Qt | |
id: cache-qt | |
uses: actions/cache@v1 # not v2! | |
with: | |
path: ../Qt | |
key: ${{ runner.os }}-QtCache-${{ matrix.qtvers }} | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v2 | |
with: | |
cached: ${{ steps.cache-qt.outputs.cache-hit }} | |
version: ${{ matrix.qtvers }} | |
# Setup CMake | |
- name: Setup CMake | |
uses: jwlawson/[email protected] | |
- name: Clone project | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}\build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
env: | |
QT_VERSION: ${{ matrix.qtvers }} | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}\build --config ${{env.BUILD_TYPE}} | |
# Packing it | |
- name: Deploy | |
run: windeployqt.exe --release --no-quick-import ${{github.workspace}}\build\${{env.BUILD_TYPE}}\ | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
# Artifact name | |
name: QEFI Entry Manager for Windows Qt${{ matrix.qtvers }} | |
# A file, directory or wildcard pattern that describes what to upload | |
path: | | |
${{github.workspace}}\build\${{env.BUILD_TYPE}}\*.dll | |
${{github.workspace}}\build\${{env.BUILD_TYPE}}\*.exe | |
${{github.workspace}}\build\${{env.BUILD_TYPE}}\translations | |
${{github.workspace}}\build\${{env.BUILD_TYPE}}\styles | |
${{github.workspace}}\build\${{env.BUILD_TYPE}}\platforms | |
${{github.workspace}}\build\${{env.BUILD_TYPE}}\imageformats | |
${{github.workspace}}\build\${{env.BUILD_TYPE}}\iconengines |