Build #127
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
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml | |
name: Build | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs at midnight UTC every day | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build-win: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} | |
- name: Archive artifacts | |
run: | | |
Copy-Item -Path "resources" -Destination "build/BMC-ENGINE/Release" -Recurse | |
Copy-Item -Path "cool-scripts" -Destination "build/BMC-ENGINE/Release" -Recurse | |
ls ${{github.workspace}}/build/BMC-ENGINE/Release/* | |
Compress-Archive -Path ${{github.workspace}}/build/BMC-ENGINE/Release/* -DestinationPath ${{github.workspace}}/build/Windows.zip | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-win | |
path: ${{github.workspace}}/build/Windows.zip | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Update packages | |
run: sudo apt-get update | |
- name: Install packages | |
run: sudo apt-get install --fix-missing -y libgl1-mesa-dev libwayland-dev wayland-protocols libxkbcommon-dev libxrandr-dev libxinerama-dev libx11-dev libxcursor-dev libxi-dev | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} | |
- name: Archive artifacts | |
shell: pwsh | |
run: | | |
ls ${{github.workspace}}/build | |
ls ${{github.workspace}}/build/BMC-ENGINE | |
ls ${{github.workspace}}/build/BMC-ENGINE/BMC-ENGINE | |
Compress-Archive -Path ${{github.workspace}}/build/BMC-ENGINE/* -DestinationPath ${{github.workspace}}/build/Linux.zip | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-linux | |
path: ${{github.workspace}}/build/Linux.zip | |
package: | |
name: make-release | |
runs-on: ubuntu-latest | |
needs: ['build-win', 'build-linux'] | |
if: github.event_name == 'push' | |
steps: | |
- name: Download Windows Build | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-win | |
- name: Download Linux Build | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-linux | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.RELEASE_TOKEN }}" | |
automatic_release_tag: "nightly" | |
prerelease: true | |
title: "Nightly" | |
files: | | |
/home/runner/work/BMC-Engine/BMC-Engine/Windows.zip | |
/home/runner/work/BMC-Engine/BMC-Engine/Linux.zip |