Skip to content

Automation: Add Windows code #21

Automation: Add Windows code

Automation: Add Windows code #21

Workflow file for this run

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 MinGW
uses: egor-tensin/setup-mingw@v2.2.0
with:
mingw: 'x86_64'
msys2: true
- name: Set up Qt
uses: jurplel/install-qt-action@v3
with:
qmake-version: '6'
cmake-args: '-DCMAKE_PREFIX_PATH=C:/Qt/6.x/mingw81_64'
- name: Configure and build
run: |
mkdir build
cd build
cmake ..
cmake --build .
- name: Push binaries
uses: actions/upload-artifact@v2
with:
name: windows-binaries
path: build/DesktopZephyr.exe
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