mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-12 20:22:37 -04:00
Build soh.o2r in CI without libultraship or soh
SOH_TOOLS_ONLY returns from the root CMakeLists once the asset tools are declared, before libultraship and soh are added, so a configure that only needs soh-o2r-packer never reaches LUS's find_package(SDL2 REQUIRED). That lets generate-soh-otr drop building SDL2 from source, SDL2_net, and the deps cache that existed to hold the SDL2 tarball -- eleven steps down to six. Verified a tools-only build produces the archive with all 1,042 entries matching. The tool targets move above the sub-projects so the early return can sit between them; they only ever needed torch. The packer creates its output directory, which previously came for free from soh's build directory.
This commit is contained in:
@@ -26,40 +26,13 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y $(cat linux-build-deps/apt.txt)
|
||||
- name: Restore Cached deps folder
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
key: ${{ runner.os }}-deps-${{ github.ref }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-deps-${{ github.ref }}-
|
||||
${{ runner.os }}-deps-
|
||||
path: deps
|
||||
- name: Create deps folder
|
||||
run: mkdir -p deps
|
||||
- name: Add ccache to PATH
|
||||
run: |
|
||||
echo "/usr/lib/ccache" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/ccache/libexec" >> "$GITHUB_PATH"
|
||||
- name: Install latest SDL
|
||||
run: |
|
||||
if [ ! -d "deps/SDL2-2.30.3" ]; then
|
||||
wget https://github.com/libsdl-org/SDL/releases/download/release-2.30.3/SDL2-2.30.3.tar.gz
|
||||
tar -xzf SDL2-2.30.3.tar.gz -C deps
|
||||
fi
|
||||
cd deps/SDL2-2.30.3
|
||||
./configure --enable-hidapi-libusb
|
||||
make -j 10
|
||||
sudo make install
|
||||
sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
|
||||
- uses: ./.github/actions/install-sdl2-net
|
||||
- name: Copy SDL libs to multiarch dir
|
||||
run: sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
|
||||
- name: Remove distro tinyxml2
|
||||
run: sudo apt-get remove libtinyxml2-dev
|
||||
- uses: ./.github/actions/install-tinyxml2
|
||||
- name: Generate soh.o2r
|
||||
run: |
|
||||
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release
|
||||
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DSOH_TOOLS_ONLY=ON
|
||||
cmake --build build-cmake --config Release --target GenerateSohOtr -j3
|
||||
- name: Upload soh.o2r
|
||||
uses: actions/upload-artifact@v7
|
||||
|
||||
Reference in New Issue
Block a user