osb/.github/workflows/build_windows.yml

77 lines
1.8 KiB
YAML
Raw Normal View History

2024-02-18 12:55:01 +00:00
name: Windows
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "*"
jobs:
build:
2024-03-08 09:09:27 +00:00
name: Build OpenStarbound Windows x64
2024-02-18 12:55:01 +00:00
runs-on: windows-latest
steps:
2024-03-08 09:09:27 +00:00
- name: Checkout
uses: actions/checkout@v4
2024-02-18 12:55:01 +00:00
with:
submodules: 'recursive'
2024-03-08 09:09:27 +00:00
- name: Hire a Ninja
run: |
choco install ninja
ninja.exe --version
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- name: sccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
key: ${{ github.job }}-${{ runner.os }}
max-size: 2500M
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- uses: ilammy/msvc-dev-cmd@v1
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- name: vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
vcpkgJsonGlob: '**/source/vcpkg.json'
vcpkgConfigurationJsonGlob: '**/source/vcpkg-configuration.json'
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- name: Run CMake
uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: '${{ github.workspace }}/source/CMakeLists.txt'
configurePreset: 'windows-release'
buildPreset: 'windows-release'
testPreset: 'windows-release'
2024-02-18 12:55:01 +00:00
- name: Run Post-Build Task
2024-03-08 09:09:27 +00:00
working-directory: ${{ github.workspace }}
run: scripts\ci\windows\post_build.bat
2024-02-18 12:55:01 +00:00
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: OpenStarbound-Dev-Windows-x64
path: dist/*
2024-03-08 09:09:27 +00:00
- name: Assemble Install Files
working-directory: ${{ github.workspace }}
run: scripts\ci\windows\assemble.bat
- name: Create Installer
working-directory: ${{ github.workspace }}
run: |
& "C:\Program Files (x86)\Inno Setup 6\iscc.exe" /Oinstaller scripts\inno\setup.iss
- name: Upload Installer
uses: actions/upload-artifact@v4
with:
name: Installer
path: installer/*