mirror of
https://github.com/izzy2lost/Ghostship.git
synced 2026-10-26 11:45:44 -07:00
83 lines
3.0 KiB
YAML
83 lines
3.0 KiB
YAML
name: Linux Validation
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ "*" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0 # full history so the libultraship submodule gitlink resolves
|
|
- name: Update machine
|
|
run: sudo apt update
|
|
- name: Install dependencies
|
|
run: sudo apt-get install gcc g++ git cmake ninja-build lsb-release libsdl2-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev libogg-dev libvorbis-dev libmbedtls-dev libvulkan-dev libshaderc-dev glslang-dev spirv-tools
|
|
- name: Install python dependencies
|
|
run: pip3 install cryptography --break-system-packages
|
|
- name: ccache
|
|
uses: hendrikmuhs/ccache-action@v1.2.14
|
|
with:
|
|
key: linux-validation-ccache-${{ github.ref }}-${{ github.sha }}
|
|
restore-keys: |
|
|
linux-validation-ccache-${{ github.ref }}
|
|
linux-validation-ccache-
|
|
- name: Cache build folders
|
|
uses: actions/cache@v6
|
|
with:
|
|
key: linux-validation-build-${{ github.ref }}-${{ github.sha }}
|
|
restore-keys: |
|
|
linux-validation-build-${{ github.ref }}
|
|
linux-validation-build-
|
|
path: |
|
|
SDL2-2.24.1
|
|
tinyxml2-10.0.0
|
|
- name: Install latest SDL
|
|
run: |
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
if [ ! -d "SDL2-2.24.1" ]; then
|
|
wget https://www.libsdl.org/release/SDL2-2.24.1.tar.gz
|
|
tar -xzf SDL2-2.24.1.tar.gz
|
|
fi
|
|
cd SDL2-2.24.1
|
|
./configure
|
|
make -j 10
|
|
sudo make install
|
|
- name: Install latest tinyxml2
|
|
run: |
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
if [ ! -d "tinyxml2-10.0.0" ]; then
|
|
wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz
|
|
tar -xzf 10.0.0.tar.gz
|
|
fi
|
|
cd tinyxml2-10.0.0
|
|
mkdir -p build
|
|
cd build
|
|
cmake ..
|
|
make
|
|
sudo make install
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- name: Install Python dependencies
|
|
run: pip install -r libultraship/requirements.txt
|
|
- name: Build
|
|
run: |
|
|
# Route the compiler through ccache (Ninja honors COMPILER_LAUNCHER).
|
|
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -DPython3_EXECUTABLE=$(which python3)
|
|
cmake --build build-cmake -j
|
|
- name: Create Package
|
|
run: |
|
|
mkdir Ghostship-release
|
|
mv build-cmake/Ghostship Ghostship-release/
|
|
- name: Publish packaged artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Ghostship-linux-x64
|
|
path: Ghostship-release
|
|
retention-days: 1
|