Skip to content

Commit

Permalink
fix linux toolchain caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Randomblock1 committed Jan 19, 2023
1 parent 89a4604 commit d72ebbd
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,18 @@ runs:
shell: bash
if: runner.os == 'Linux'
run: |
TMP_DL=$(mktemp -d)
wget https://github.com/CRKatri/llvm-project/releases/download/swift-5.3.2-RELEASE/swift-5.3.2-RELEASE-ubuntu20.04.tar.zst -P $TMP_DL
TMP=$(mktemp -d)
tar -xvf $TMP_DL/swift-5.3.2-RELEASE-ubuntu20.04.tar.zst -C $TMP
mkdir -p $THEOS/toolchain/linux/iphone $THEOS/toolchain/swift
mv $TMP/swift-5.3.2-RELEASE-ubuntu20.04/* $THEOS/toolchain/linux/iphone/
ln -s $THEOS/toolchain/linux/iphone $THEOS/toolchain/swift
rm -Rf $TMP_DL $TMP
if [[ "$(ls ${{ inputs.theos-dir }}/sdks)" ]]; then
echo "Linux toolchain already cached, skipping..."
else
TMP_DL=$(mktemp -d)
wget https://github.com/CRKatri/llvm-project/releases/download/swift-5.3.2-RELEASE/swift-5.3.2-RELEASE-ubuntu20.04.tar.zst -P $TMP_DL
TMP=$(mktemp -d)
tar -xvf $TMP_DL/swift-5.3.2-RELEASE-ubuntu20.04.tar.zst -C $TMP
mkdir -p $THEOS/toolchain/linux/iphone $THEOS/toolchain/swift
mv $TMP/swift-5.3.2-RELEASE-ubuntu20.04/* $THEOS/toolchain/linux/iphone/
ln -s $THEOS/toolchain/linux/iphone $THEOS/toolchain/swift
rm -Rf $TMP_DL $TMP
fi
- name: Get SDKs
shell: bash
Expand Down

0 comments on commit d72ebbd

Please sign in to comment.