Skip to content

[chore] Bump version #222

[chore] Bump version

[chore] Bump version #222

Workflow file for this run

name: build
on: [push]
jobs:
build:
strategy:
matrix:
os:
- { runner: 'windows-latest', type: 'windows', architecture: 'x64', triplet: 'x64-windows-static' }
- { runner: 'ubuntu-22.04', type: 'ubuntu', architecture: 'x64', triplet: 'x64-linux' }
- { runner: 'macos-latest', type: 'macos', architecture: 'arm64', triplet: 'arm64-osx' }
runs-on: ${{ matrix.os.runner }}
steps:
- name: Install system dependencies
if: ${{ matrix.os.type == 'ubuntu' }}
run: |
sudo apt-get install libxi-dev libxtst-dev libxrandr-dev
sudo apt install libx11-dev libxft-dev libxext-dev
sudo apt-get install libwayland-dev libxkbcommon-dev libegl1-mesa-dev libgles2-mesa-dev
sudo apt-get install linux-libc-dev
- uses: actions/checkout@v4
with:
submodules: true
- uses: lukka/get-cmake@latest
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
id: vcpkg
- name: Build
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ steps.vcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{ matrix.os.triplet }} ..
cmake --build . --config Release --target MWGroundcoverGenerator
cmake --build . --config Release --target MWGroundcoverGeneratorCLI
- name: Run tests
if: ${{ matrix.os.type == 'ubuntu' || matrix.os.type == 'macos' }}
run: |
cd build
make MWGroundcoverGeneratorTests
CTEST_OUTPUT_ON_FAILURE=1 make test
- name: Make release directory, copy common artifacts
run: |
mkdir release
mkdir release/cli
cp LICENCE.txt release/LICENCE.txt
cp CHANGELOG.md release/CHANGELOG.md.txt
cp docs/CLI.md release/cli/
mkdir -p release/docs/examples
cp docs/documented_configuration_example.ini release/docs/documented_configuration_example.ini
cp tst/generation_snapshots/any_named_cell_exclusion/configuration.ini release/docs/examples/any_named_cell_exclusion.ini
cp tst/generation_snapshots/bans/configuration.ini release/docs/examples/bans.ini
cp tst/generation_snapshots/cell_name_exclusion/configuration.ini release/docs/examples/cell_name_exclusion.ini
cp tst/generation_snapshots/region_exclusion/configuration.ini release/docs/examples/region_exclusion.ini
- run: npm i markdown-to-html-cli -g
- run: markdown-to-html --source README.md --output release/README.html --github-corners https://github.com/Yacoby/mw-groundcover-generator
- run: markdown-to-html --source docs/UserGuide.md --output release/docs/UserGuide.html --img-base64 --github-corners https://github.com/Yacoby/mw-groundcover-generator
- name: Copy windows artifacts to the release directory
if: ${{ matrix.os.type == 'windows' }}
run: |
cp build/Release/MWGroundcoverGenerator.exe release/MWGroundcoverGenerator.exe
cp build/Release/MWGroundcoverGeneratorCLI.exe release/cli/MWGroundcoverGeneratorCLI.exe
- name: Copy linux artifacts to the release directory
if: ${{ matrix.os.type == 'ubuntu' }}
run: |
cp build/MWGroundcoverGenerator release/
cp build/MWGroundcoverGeneratorCLI release/cli/
- name: Copy macos artifacts to the release directory
if: ${{ matrix.os.type == 'macos' }}
run: |
cp -r build/MWGroundcoverGenerator.app release
cp -r build/MWGroundcoverGeneratorCLI release/cli
- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
name: 'mw-groundcover-generator-${{ matrix.os.type }}-${{ matrix.os.architecture }}'
path: release/
if-no-files-found: error