osb/.github/workflows/build_linux.yml

73 lines
1.8 KiB
YAML
Raw Normal View History

2024-02-18 12:55:01 +00:00
name: Ubuntu Linux
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "*"
jobs:
build:
name: OpenStarbound Linux x86_64
runs-on: ubuntu-latest
steps:
- name: Install Packages
run: |
sudo apt-get update
2024-03-08 17:08:28 +00:00
sudo apt-get install -y pkg-config ninja-build \
2024-03-08 17:42:26 +00:00
libxmu-dev libxi-dev libgl-dev libglu1-mesa-dev libsdl2-dev
2024-03-08 17:06:27 +00:00
- uses: actions/checkout@v4
with:
submodules: 'recursive'
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 }}
2024-03-17 12:44:35 +00:00
max-size: ${{ vars.SCCACHE_MAX_SIZE }}
restore: ${{ vars.SCCACHE_RESTORE }}
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: 'linux-release'
buildPreset: 'linux-release'
testPreset: 'linux-release'
2024-02-18 12:55:01 +00:00
2024-03-17 11:30:29 +00:00
- name: Assemble Files
working-directory: ${{ github.workspace }}
run: scripts/ci/linux/assemble.sh
2024-02-18 12:55:01 +00:00
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
2024-03-17 11:30:29 +00:00
name: OpenStarbound-Linux
path: dist.tar
- name: Upload Client Files
uses: actions/upload-artifact@v4
with:
name: OpenStarbound-Linux-Client
path: client.tar
- name: Upload Server Files
uses: actions/upload-artifact@v4
with:
name: OpenStarbound-Linux-Server
path: server.tar