This commit is contained in:
Li 2022-07-17 21:31:47 +12:00
parent 813e826716
commit 693acfdbe6

View file

@ -28,13 +28,7 @@ jobs:
sudo apt update
sudo apt install -y clang zlib1g-dev dos2unix qemu qemu-user-static binfmt-support debootstrap binutils-aarch64-linux-gnu binutils-arm-linux-gnueabihf binutils-arm-linux-gnueabi
# - name: Setup cross compiling
# run: |
# wget https://raw.githubusercontent.com/dotnet/runtime/main/eng/common/cross/build-rootfs.sh -O build-rootfs.sh
# chmod +x build-rootfs.sh
# sudo mkdir /usr/armroot
# sudo /usr/bin/env bash build-rootfs.sh BuildArch arm64 --rootfsdir /usr/armroot
- name: Restore dependencies
run: |
dotnet restore LibHISP
@ -65,18 +59,22 @@ jobs:
- name: Build linux-arm64
continue-on-error: false
run: |
dotnet add HISPd package Microsoft.DotNet.ILCompiler --prerelease
dotnet add HISPd package runtime.linux-x64.Microsoft.DotNet.ILCompiler --prerelease
cd HISPd
dotnet publish -r linux-arm64 -c Linux /p:Platform=ARM64 --self-contained
cd ..
mkdir -p HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/gamedata
cp -r HISPd/bin/ARM64/Linux/net7.0/linux-arm64/gamedata/* HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/gamedata
cp HISPd/bin/ARM64/Linux/net7.0/linux-arm64/HI1.MAP HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/HI1.MAP
cp HISPd/bin/ARM64/Linux/net7.0/linux-arm64/publish/libe_sqlite3.so HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/libe_sqlite3.so
rm -f HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/HISPd.dbg
dotnet remove HISPd package Microsoft.DotNet.ILCompiler
dotnet remove HISPd package runtime.linux-x64.Microsoft.DotNet.ILCompiler
# dotnet add HISPd package Microsoft.DotNet.ILCompiler --prerelease
# dotnet add HISPd package runtime.linux-x64.Microsoft.DotNet.ILCompiler --prerelease
# cd HISPd
# dotnet publish -r linux-arm64 -c Linux /p:Platform=ARM64 --self-contained
# cd ..
# mkdir -p HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/gamedata
# cp -r HISPd/bin/ARM64/Linux/net7.0/linux-arm64/gamedata/* HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/gamedata
# cp HISPd/bin/ARM64/Linux/net7.0/linux-arm64/HI1.MAP HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/HI1.MAP
# cp HISPd/bin/ARM64/Linux/net7.0/linux-arm64/publish/libe_sqlite3.so HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/libe_sqlite3.so
# rm -f HISPd/bin/ARM64/Linux/net7.0/linux-arm64/native/HISPd.dbg
# dotnet remove HISPd package Microsoft.DotNet.ILCompiler
# dotnet remove HISPd package runtime.linux-x64.Microsoft.DotNet.ILCompiler
- name: Build deb package
continue-on-error: false