GHA: Inline toolchain setup

This commit is contained in:
Serhii Snitsaruk 2024-05-26 09:40:03 +02:00
parent 8b17db27cf
commit f163166bc5
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
3 changed files with 54 additions and 21 deletions

View File

@ -133,19 +133,20 @@ jobs:
id: output-name-prefix
run: echo "name-prefix=${NAME_PREFIX}" >> $GITHUB_OUTPUT
# - name: Setup Linux toolchain
# if: matrix.opts.platform == 'linux'
# uses: ./limboai/.github/actions/setup-linux-toolchain
# with:
# arch: ${{matrix.opts.arch}}
- name: Use cached buildroot
id: cache-buildroot
uses: actions/cache@v4
with:
path: buildroot
key: 16c8302fcb676c1f0fb9df73d6cff250ba1f4286
fail-on-cache-miss: true
- name: Set up buildroot
if: matrix.opts.platform == 'linux' && matrix.opts.arch == 'x86_64'
shell: bash
run: |
mkdir buildroot
wget https://github.com/godotengine/buildroot/releases/download/godot-2020.11.x-2/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 -O buildroot/buildroot.tar.bz2
cd buildroot
echo "16c8302fcb676c1f0fb9df73d6cff250ba1f4286 buildroot.tar.bz2"
echo "16c8302fcb676c1f0fb9df73d6cff250ba1f4286 buildroot.tar.bz2" | shasum --check
tar -xjf buildroot.tar.bz2 --strip-components=1
ls -l
rm buildroot.tar.bz2
./relocate-sdk.sh
cd ..
- name: Set up Python 3.x
if: matrix.opts.platform == 'windows' || matrix.opts.platform == 'macos'

View File

@ -139,10 +139,34 @@ jobs:
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Set up Linux toolchain
uses: ./modules/limboai/.github/actions/setup-linux-toolchain
with:
arch: ${{matrix.opts.arch}}
- name: Set up buildroot
if: matrix.opts.arch == 'x86_64'
shell: bash
run: |
mkdir buildroot
wget https://github.com/godotengine/buildroot/releases/download/godot-2020.11.x-2/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 -O buildroot/buildroot.tar.bz2
cd buildroot
echo "16c8302fcb676c1f0fb9df73d6cff250ba1f4286 buildroot.tar.bz2" | shasum --check
tar -xjf buildroot.tar.bz2 --strip-components=1
ls -l
rm buildroot.tar.bz2
./relocate-sdk.sh
cd ..
- name: Set up buildroot
if: matrix.opts.arch == 'x86_32'
shell: bash
run: |
mkdir buildroot
wget https://github.com/godotengine/buildroot/releases/download/godot-2020.11.x-2/i686-godot-linux-gnu_sdk-buildroot.tar.bz2 -O buildroot/buildroot.tar.bz2
cd buildroot
echo " buildroot.tar.bz2"
echo "6171652abc54ef219e5187bc53660ee4e2f796f4 buildroot.tar.bz2" | shasum --check
tar -xjf buildroot.tar.bz2 --strip-components=1
ls -l
rm buildroot.tar.bz2
./relocate-sdk.sh
cd ..
- name: Set up scons cache
uses: actions/cache@v4

View File

@ -52,10 +52,18 @@ jobs:
with:
path: modules/limboai
- name: Set up Linux toolchain
uses: ./modules/limboai/.github/actions/setup-linux-toolchain
with:
arch: x86_64
- name: Set up buildroot
shell: bash
run: |
mkdir buildroot
wget https://github.com/godotengine/buildroot/releases/download/godot-2020.11.x-2/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 -O buildroot/buildroot.tar.bz2
cd buildroot
echo "16c8302fcb676c1f0fb9df73d6cff250ba1f4286 buildroot.tar.bz2" | shasum --check
tar -xjf buildroot.tar.bz2 --strip-components=1
ls -l
rm buildroot.tar.bz2
./relocate-sdk.sh
cd ..
- name: Set up scons cache
uses: actions/cache@v4