Skip to content

fdsa

fdsa #200

Workflow file for this run

name: betacraft-build
on:
push:
branches: [ "ci-fix" ]
pull_request:
branches: [ "ci-fix" ]
env:
BUILD_TYPE: Release
BETACRAFT_API_MICROSOFT_CLIENT_ID: ""
BETACRAFT_DISCORD_CLIENT_ID: 0
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- uses: lukka/get-cmake@latest
- if: ${{ (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest') }}
name: Install Qt (ubuntu-latest || macos-latest)
uses: jurplel/install-qt-action@v3
with:
version: '6.5.1'
cache: 'true'
cache-key-prefix: 'install-qt-action'
set-env: 'true'
- if: matrix.os == 'windows-latest'
name: Install Qt (windows-latest)
uses: jurplel/install-qt-action@v3
with:
version: '6.5.1'
cache: 'true'
cache-key-prefix: 'install-qt-action'
set-env: 'true'
arch: 'win64_mingw'
- name: CMake
working-directory: ${{github.workspace}}
run: |
mkdir build
cd build
if [ "$RUNNER_OS" == "Windows" ]; then
cmake .. -G "MinGW Makefiles"
else
cmake ..
fi
shell: bash
- name: Build
working-directory: ${{github.workspace}}/build
run: make
- name: Cache libs
id: cache-libs
uses: actions/cache@v3
env:
cache-name: cache-libs
with:
path: ${{github.workspace}}/build/lib
key: ${{ runner.os }}-build-${{ env.cache-name }}-
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Test
working-directory: ${{github.workspace}}/build/src
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure