Merge branch 'main' of https://github.com/NDRAEY/DesktopZephyr #27
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 | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build_linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install needed packages | |
run: | | |
sudo apt install cmake clang-15 qt6-base-dev libglx-dev libgl1-mesa-dev libxkbcommon-dev -y | |
- name: Build | |
run: mkdir build && cd build && cmake .. && make -j$(nproc) | |
- name: Push binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: linux-binaries | |
path: build/DesktopZephyr | |
build_windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Test | |
run: echo HI! | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Chocolatey | |
shell: pwsh | |
run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | |
- name: Install MinGw and Zip | |
run: choco install mingw zip | |
- name: Set up Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: '6.5.1' | |
arch: 'win64_mingw' | |
- name: Configure and build | |
run: | | |
mkdir build | |
cd build | |
cmake -G "MinGW Makefiles" .. | |
cmake --build . | |
- name: Deploy app | |
run: D:/a/DesktopZephyr/Qt/6.5.1/mingw_64/bin/windeployqt.exe build/ | |
- name: Archive app | |
run: zip -r DesktopZephyr_Windows.zip build/ | |
- name: Push binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-binaries | |
path: DesktopZephyr_Windows.zip | |
upload_release: | |
runs-on: ubuntu-latest | |
needs: [build_linux, build_windows] | |
steps: | |
- name: Download artifacts (Linux) | |
uses: actions/download-artifact@v2 | |
with: | |
name: linux-binaries | |
path: artifacts/ | |
- name: Download artifacts (Windows) | |
uses: actions/download-artifact@v2 | |
with: | |
name: windows-binaries | |
path: artifacts/ | |
- name: Test | |
run: ls -lh | |
- name: Upload | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: artifacts/* | |
tag_name: latest-nightly | |
release_name: Latest ~${{ github.run_number }} | |
body: Automated release from GitHub Actions |