2024-05-25 08:16:40 +00:00
|
|
|
name: Setup Linux toolchain
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
arch:
|
|
|
|
required: true
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2024-05-25 09:38:29 +00:00
|
|
|
- name: Set up environment
|
2024-05-25 08:16:40 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-05-25 09:38:29 +00:00
|
|
|
# ! Settings:
|
2024-05-26 07:32:49 +00:00
|
|
|
TOOLCHAIN_64_URL=https://github.com/godotengine/buildroot/releases/download/godot-2020.11.x-2/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
|
2024-05-25 09:38:29 +00:00
|
|
|
TOOLCHAIN_64_SHA=16c8302fcb676c1f0fb9df73d6cff250ba1f4286
|
2024-05-26 07:32:49 +00:00
|
|
|
TOOLCHAIN_32_URL=https://github.com/godotengine/buildroot/releases/download/godot-2020.11.x-2/i686-godot-linux-gnu_sdk-buildroot.tar.bz2
|
2024-05-25 09:38:29 +00:00
|
|
|
TOOLCHAIN_32_SHA=6171652abc54ef219e5187bc53660ee4e2f796f4
|
2024-07-30 12:50:29 +00:00
|
|
|
TOOLCHAIN_ARM64_URL=https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-3/aarch64-godot-linux-gnu_sdk-buildroot.tar.bz2
|
|
|
|
TOOLCHAIN_ARM64_SHA=73bed3d26b92c8b9a93c0ceb6bcce8fe567d1764
|
2024-07-31 10:19:44 +00:00
|
|
|
TOOLCHAIN_ARM32_URL=https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-3/arm-godot-linux-gnueabihf_sdk-buildroot.tar.bz2
|
|
|
|
TOOLCHAIN_ARM32_SHA=aa5853fd73faec3837c6127649471275d7e61cb2
|
2024-07-30 12:50:29 +00:00
|
|
|
|
2024-05-25 09:38:29 +00:00
|
|
|
# ! Export variables:
|
|
|
|
if [[ "${{ inputs.arch }}" == "x86_64" ]]; then
|
|
|
|
echo "TOOLCHAIN_URL=${TOOLCHAIN_64_URL}" >> "$GITHUB_ENV"
|
|
|
|
echo "TOOLCHAIN_SHA=${TOOLCHAIN_64_SHA}" >> "$GITHUB_ENV"
|
|
|
|
elif [[ "${{ inputs.arch }}" == "x86_32" ]]; then
|
|
|
|
echo "TOOLCHAIN_URL=${TOOLCHAIN_32_URL}" >> "$GITHUB_ENV"
|
|
|
|
echo "TOOLCHAIN_SHA=${TOOLCHAIN_32_SHA}" >> "$GITHUB_ENV"
|
2024-07-30 12:50:29 +00:00
|
|
|
elif [[ "${{ inputs.arch }}" == "arm64" ]]; then
|
|
|
|
echo "TOOLCHAIN_URL=${TOOLCHAIN_ARM64_URL}" >> "$GITHUB_ENV"
|
|
|
|
echo "TOOLCHAIN_SHA=${TOOLCHAIN_ARM64_SHA}" >> "$GITHUB_ENV"
|
2024-07-31 10:19:44 +00:00
|
|
|
elif [[ "${{ inputs.arch }}" == "arm32" ]]; then
|
|
|
|
echo "TOOLCHAIN_URL=${TOOLCHAIN_ARM32_URL}" >> "$GITHUB_ENV"
|
|
|
|
echo "TOOLCHAIN_SHA=${TOOLCHAIN_ARM32_SHA}" >> "$GITHUB_ENV"
|
2024-05-25 09:38:29 +00:00
|
|
|
fi
|
2024-05-25 08:16:40 +00:00
|
|
|
|
|
|
|
- name: Cache buildroot
|
|
|
|
id: cache-buildroot
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: buildroot
|
|
|
|
key: ${{env.TOOLCHAIN_SHA}}
|
|
|
|
|
|
|
|
- name: Set up buildroot
|
|
|
|
if: steps.cache-buildroot.outputs.cache-hit != 'true'
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir buildroot
|
|
|
|
wget ${TOOLCHAIN_URL} -O buildroot/buildroot.tar.bz2
|
|
|
|
cd buildroot
|
|
|
|
echo "${TOOLCHAIN_SHA} buildroot.tar.bz2"
|
|
|
|
echo "${TOOLCHAIN_SHA} buildroot.tar.bz2" | shasum --check
|
|
|
|
tar -xjf buildroot.tar.bz2 --strip-components=1
|
|
|
|
ls -l
|
|
|
|
rm buildroot.tar.bz2
|
|
|
|
./relocate-sdk.sh
|
|
|
|
cd ..
|