From 26382e077a9d068d8567cb22f15e7177243915ff Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sat, 25 May 2024 11:38:29 +0200 Subject: [PATCH] GHA: Verify toolchain checksum --- .../actions/setup-linux-toolchain/action.yml | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/actions/setup-linux-toolchain/action.yml b/.github/actions/setup-linux-toolchain/action.yml index df5d896..43dd3d1 100644 --- a/.github/actions/setup-linux-toolchain/action.yml +++ b/.github/actions/setup-linux-toolchain/action.yml @@ -7,17 +7,22 @@ inputs: runs: using: "composite" steps: - - name: Set TOOLCHAIN_URL (x86_64) - if: inputs.arch == 'x86_64' + - name: Set up environment 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" + # ! Settings: + TOOLCHAIN_64_URL=https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 + TOOLCHAIN_64_SHA=16c8302fcb676c1f0fb9df73d6cff250ba1f4286 + TOOLCHAIN_32_URL=https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/i686-godot-linux-gnu_sdk-buildroot.tar.bz2 + 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 - name: Cache buildroot id: cache-buildroot @@ -33,6 +38,7 @@ runs: mkdir buildroot wget ${TOOLCHAIN_URL} -O buildroot/buildroot.tar.bz2 cd buildroot + echo "${TOOLCHAIN_SHA} buildroot.tar.bz2" | shasum --check tar -xjf buildroot.tar.bz2 ls -l rm buildroot.tar.bz2