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 id: output-name-prefix
run: echo "name-prefix=${NAME_PREFIX}" >> $GITHUB_OUTPUT run: echo "name-prefix=${NAME_PREFIX}" >> $GITHUB_OUTPUT
# - name: Setup Linux toolchain - name: Set up buildroot
# if: matrix.opts.platform == 'linux' if: matrix.opts.platform == 'linux' && matrix.opts.arch == 'x86_64'
# uses: ./limboai/.github/actions/setup-linux-toolchain shell: bash
# with: run: |
# arch: ${{matrix.opts.arch}} 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
- name: Use cached buildroot cd buildroot
id: cache-buildroot echo "16c8302fcb676c1f0fb9df73d6cff250ba1f4286 buildroot.tar.bz2"
uses: actions/cache@v4 echo "16c8302fcb676c1f0fb9df73d6cff250ba1f4286 buildroot.tar.bz2" | shasum --check
with: tar -xjf buildroot.tar.bz2 --strip-components=1
path: buildroot ls -l
key: 16c8302fcb676c1f0fb9df73d6cff250ba1f4286 rm buildroot.tar.bz2
fail-on-cache-miss: true ./relocate-sdk.sh
cd ..
- name: Set up Python 3.x - name: Set up Python 3.x
if: matrix.opts.platform == 'windows' || matrix.opts.platform == 'macos' 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. # Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version - uses: ./modules/limboai/.github/actions/init-version
- name: Set up Linux toolchain - name: Set up buildroot
uses: ./modules/limboai/.github/actions/setup-linux-toolchain if: matrix.opts.arch == 'x86_64'
with: shell: bash
arch: ${{matrix.opts.arch}} 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 - name: Set up scons cache
uses: actions/cache@v4 uses: actions/cache@v4

View File

@ -52,10 +52,18 @@ jobs:
with: with:
path: modules/limboai path: modules/limboai
- name: Set up Linux toolchain - name: Set up buildroot
uses: ./modules/limboai/.github/actions/setup-linux-toolchain shell: bash
with: run: |
arch: x86_64 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 - name: Set up scons cache
uses: actions/cache@v4 uses: actions/cache@v4