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
|
|
|
|
2024-03-16 13:17:16 +00:00
|
|
|
- name: Run Post-Build Task
|
2024-03-08 09:09:27 +00:00
|
|
|
working-directory: ${{ github.workspace }}
|
2024-03-16 13:17:16 +00:00
|
|
|
run: scripts\ci\windows\post_build.bat
|
2024-02-18 12:55:01 +00:00
|
|
|
|
2024-03-17 11:54:28 +00:00
|
|
|
- name: Assemble Files
|
|
|
|
working-directory: ${{ github.workspace }}
|
|
|
|
run: scripts\ci\windows\assemble.bat
|
|
|
|
|
2024-02-18 12:55:01 +00:00
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-03-17 11:54:28 +00:00
|
|
|
name: OpenStarbound-Windows
|
2024-02-18 12:55:01 +00:00
|
|
|
path: dist/*
|
2024-03-08 09:09:27 +00:00
|
|
|
|
2024-03-17 11:54:28 +00:00
|
|
|
- name: Upload Client
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: OpenStarbound-Windows-Client
|
|
|
|
path: client_distribution/*
|
|
|
|
|
|
|
|
- name: Upload Server
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: OpenStarbound-Windows-Server
|
|
|
|
path: server_distribution/*
|
2024-03-08 09:09:27 +00:00
|
|
|
|
|
|
|
- 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/*
|