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-25 14:07:00 +00:00
|
|
|
TOOLCHAIN_64_URL=https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
|
2024-05-25 09:38:29 +00:00
|
|
|
TOOLCHAIN_64_SHA=16c8302fcb676c1f0fb9df73d6cff250ba1f4286
|
2024-05-25 14:07:00 +00:00
|
|
|
TOOLCHAIN_32_URL=https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/i686-godot-linux-gnu_sdk-buildroot.tar.bz2
|
2024-05-25 09:38:29 +00:00
|
|
|
TOOLCHAIN_32_SHA=6171652abc54ef219e5187bc53660ee4e2f796f4
|
|
|
|
# ! 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"
|
|
|
|
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 ..
|