-
Notifications
You must be signed in to change notification settings - Fork 45
82 lines (80 loc) · 3.05 KB
/
Copy pathlinux.yml
File metadata and controls
82 lines (80 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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