Fix e6725cd #18
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
# Inspired from https://github.com/iTrooz/Qt6-HelloWorld/blob/main/.github/workflows/build.yml | |
name: Build | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
macos: | |
runs-on: macos-12 | |
name: MacOS | |
steps: | |
- name: 🧰 Checkout | |
uses: actions/checkout@v3 | |
- name: install Qt 6 | |
run: brew install qt@6 | |
- name: Build project | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=Release -B build | |
cmake --build build -j 4 | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
name: MacOS binary | |
path: | | |
build/NBTEDITOR | |
windows: | |
runs-on: windows-2022 | |
name: Windows | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: 🧰 Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
uses: msys2/setup-msys2@v2 | |
with: | |
install: zlib-devel | |
pacboy: >- | |
cmake:p | |
qt6:p | |
gcc:p | |
- name: Build project | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=Release -B build -G "Ninja" | |
cmake --build build -j 4 | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
name: Windows binary | |
path: | | |
build/nbteditor.exe | |
linux: | |
runs-on: ubuntu-22.04 | |
name: Linux | |
steps: | |
- name: 🧰 Checkout | |
uses: actions/checkout@v3 | |
- name: Build project using docker | |
run: | | |
docker buildx build . -f dist/linux.Dockerfile --progress=plain --output out --build-arg "BUILD_TYPE=Release" | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
name: Linux binary | |
path: | | |
out/nbteditor |