From f7f9cfecfc01adf8089509cde4758e812eb2dcf4 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 9 Feb 2023 05:35:30 +0300 Subject: [PATCH] ci: nswitch: use waf install to copy build artifacts --- scripts/gha/build_nswitch_docker.sh | 28 ++++++++-------------------- scripts/gha/deps_nswitch.sh | 5 ++--- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/scripts/gha/build_nswitch_docker.sh b/scripts/gha/build_nswitch_docker.sh index 5557e9ea..18aa6dec 100644 --- a/scripts/gha/build_nswitch_docker.sh +++ b/scripts/gha/build_nswitch_docker.sh @@ -2,16 +2,13 @@ . scripts/lib.sh -# args: branch name, gamedir name build_hlsdk() { - echo "Building HLSDK: $1 branch..." - git checkout switch-$1 - ./waf configure -T release --nswitch || die_configure - ./waf build || die - cp build/dlls/$1_nswitch_arm64.so ../pkgtemp/xash3d/$2/dlls/ - cp build/cl_dll/client_nswitch_arm64.so ../pkgtemp/xash3d/$2/cl_dlls/ - ./waf clean + echo "Building HLSDK: $1 branch..." + git checkout $1 + ./waf configure -T release --nswitch || die_configure + ./waf build install --destdir=../pkgtemp/xash3d || die + ./waf clean } echo "Setting up environment..." @@ -43,22 +40,13 @@ make -C libsolder install || die echo "Building engine..." ./waf configure -T release --nswitch || die_configure -./waf build || die +./waf build install --destdir=pkgtemp/xash3d || die echo "Building HLSDK..." # TODO: replace with hlsdk-portable when PRs are merged -pushd hlsdk-xash3d -build_hlsdk hl valve +pushd hlsdk-portable +build_hlsdk mobile_hacks valve build_hlsdk opfor gearbox build_hlsdk bshift bshift popd - -echo "Copying artifacts..." - -cp build/engine/xash.nro pkgtemp/xash3d/xash3d.nro -cp build/filesystem/filesystem_stdio.so pkgtemp/xash3d/ -cp build/ref/gl/libref_gl.so pkgtemp/xash3d/ -cp build/ref/soft/libref_soft.so pkgtemp/xash3d/ -cp build/3rdparty/mainui/libmenu.so pkgtemp/xash3d/ -cp build/3rdparty/extras/extras.pk3 pkgtemp/xash3d/valve/ diff --git a/scripts/gha/deps_nswitch.sh b/scripts/gha/deps_nswitch.sh index 5f577818..7f7933f6 100644 --- a/scripts/gha/deps_nswitch.sh +++ b/scripts/gha/deps_nswitch.sh @@ -9,10 +9,9 @@ docker pull devkitpro/devkita64:latest || exit 1 echo "Downloading libsolder..." rm -rf libsolder -git clone https://github.com/fgsfdsfgs/libsolder.git || exit 1 +git clone https://github.com/fgsfdsfgs/libsolder.git --depth=1 || exit 1 echo "Downloading HLSDK..." -# TODO: change to FWGS/hlsdk-portable.git when changes are merged in rm -rf hlsdk-xash3d hlsdk-portable -git clone --recursive https://github.com/fgsfdsfgs/hlsdk-xash3d.git || exit 1 +git clone --recursive https://github.com/FWGS/hlsdk-portable || exit 1