limboai/.github/actions/setup-linux-toolchain/action.yml

42 lines
1.1 KiB
YAML

name: Setup Linux toolchain
inputs:
arch:
required: true
runs:
using: "composite"
steps:
- name: Set TOOLCHAIN_URL (x86_64)
if: inputs.arch == 'x86_64'
shell: bash
run: |
echo "TOOLCHAIN_URL=https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2" >> "$GITHUB_ENV"
- name: Set TOOLCHAIN_URL (x86_32)
if: inputs.arch == 'x86_32'
shell: bash
run: |
echo "TOOLCHAIN_URL=https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/i686-godot-linux-gnu_sdk-buildroot.tar.bz2" >> "$GITHUB_ENV"
- name: Cache buildroot
id: cache-buildroot
uses: actions/cache@v4
with:
path: buildroot
key: ${{env.TOOLCHAIN_URL}}
- 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
tar -xjf buildroot.tar.bz2
ls -l
rm buildroot.tar.bz2
cd buildroot
./relocate-sdk.sh
cd ..