build: add CI (using Docker) (#2)
All checks were successful
link / Link assets on Linux (push) Successful in 5m24s
All checks were successful
link / Link assets on Linux (push) Successful in 5m24s
This commit is contained in:
parent
01a4644339
commit
dc66198e76
42
.gitea/scripts/ci.sh
Executable file
42
.gitea/scripts/ci.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Validate OAT version
|
||||
if [[ -z "$OAT_VERSION" ]]; then
|
||||
echo "No OAT version was specified, please set the OAT_VERSION environment variable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure we have cURL (and file for debugging)
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
apt-get install -y curl file libstdc++-13-dev:i386
|
||||
|
||||
# Construct the download URL
|
||||
DOWNLOAD_URL="https://github.com/Laupetin/OpenAssetTools/releases/download/v${OAT_VERSION}/oat-linux.tar.gz"
|
||||
|
||||
echo "Downloading OAT from: $DOWNLOAD_URL"
|
||||
|
||||
# Define temporary directory
|
||||
TEMP_DIR="/tmp/oat_download"
|
||||
|
||||
# Create temporary directory if it doesn't exist
|
||||
mkdir -p "$TEMP_DIR"
|
||||
|
||||
# Download the tar.gz file to the temporary directory
|
||||
curl -L -o "${TEMP_DIR}/oat-linux.tar.gz" "$DOWNLOAD_URL"
|
||||
|
||||
# Extract the contents of the tar.gz file
|
||||
tar -xzf "${TEMP_DIR}/oat-linux.tar.gz" -C "${TEMP_DIR}"
|
||||
|
||||
# Copy the executables to /usr/local/bin and make them executable
|
||||
cp "${TEMP_DIR}/Linker" "${TEMP_DIR}/Unlinker" /usr/local/bin/
|
||||
chmod +x /usr/local/bin/Linker /usr/local/bin/Unlinker
|
||||
|
||||
# Clean up temporary directory
|
||||
rm -rf "$TEMP_DIR"
|
||||
|
||||
echo "OpenAssetTools version $OAT_VERSION has been installed."
|
||||
|
||||
Linker -v --load "./deps/iw5-zones/zone/english/code_post_gfx_mp.ff" --menu-permissive --menu-no-optimization code_post_gfx_mp
|
||||
|
||||
Linker -v --load "./deps/iw5-zones/zone/english/localized_ui_mp.ff" --menu-permissive --menu-no-optimization localized_ui_mp
|
42
.gitea/workflows/link.yml
Normal file
42
.gitea/workflows/link.yml
Normal file
@ -0,0 +1,42 @@
|
||||
name: link
|
||||
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
OAT_VERSION: "0.10.0"
|
||||
|
||||
jobs:
|
||||
link-linux:
|
||||
name: Link assets on Linux
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out files
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
# NOTE - If LFS ever starts getting used for storing zones, switch this to true!
|
||||
lfs: false
|
||||
|
||||
- name: Make sure we have the deps
|
||||
run: |
|
||||
git submodule update --init --recursive
|
||||
|
||||
- name: Link assets
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: ubuntu:noble
|
||||
options: --volumes-from=${{ env.JOB_CONTAINER_NAME }}
|
||||
run: |
|
||||
cd ${{ github.workspace }}
|
||||
export OAT_VERSION=${{ env.OAT_VERSION }}
|
||||
./.gitea/scripts/ci.sh
|
||||
|
||||
- name: Upload assets
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: assets
|
||||
path: |
|
||||
zone_out/code_post_gfx_mp/code_post_gfx_mp.ff
|
||||
zone_out/code_post_gfx_mp/localized_ui_mp.ff
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "deps/iw5-zones"]
|
||||
path = deps/iw5-zones
|
||||
url = https://git.alterware.dev/AlterWare/iw5-zones.git
|
1
deps/iw5-zones
vendored
Submodule
1
deps/iw5-zones
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d65f60376c6a92185e7e47b6dd160ada44a6a600
|
Loading…
x
Reference in New Issue
Block a user