Cache #305
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cache | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repo Clang | |
uses: MoeKernel/[email protected] | |
with: | |
owner: MoeKernel | |
repository: clang | |
branch: main | |
access-token: ${{ secrets.TOKEN_GITHUB }} | |
- name: Export Variables | |
working-directory: ./clang | |
run: | | |
echo "TOKEN_GITHUB=${{ secrets.TOKEN_GITHUB }}" >> .env | |
- name: Install Depends | |
working-directory: ./clang | |
run: | | |
pip install -r requirements.txt | |
- name: Check Clang Update | |
id: check-update | |
working-directory: ./clang | |
run: | | |
python3 update.py | |
continue-on-error: true | |
- name: Purge Cache | |
uses: MoeKernel/purge-cache@v3 | |
with: | |
max-age: 1 | |
debug: True | |
cache_key: 'Linux-tc' | |
token: ${{ secrets.TOKEN_GITHUB }} | |
- name: Download Clang | |
if: steps.check-update.outcome == 'success' | |
working-directory: ./clang | |
run: | | |
chmod +x clang.sh | |
./clang.sh | |
- name: Create Release to GitHub. | |
working-directory: ./clang | |
run: | | |
python3 create_release.py | |
- name: Setup GCC / GCC32 / Clang | |
run: | | |
TC_DIR="$HOME/tc/clang-20.0.0" | |
GCC_64_DIR="$HOME/tc/aarch64-linux-android-15.0" | |
GCC_32_DIR="$HOME/tc/arm-linux-androideabi-15.0" | |
if ! [ -d "${GCC_64_DIR}" ]; then | |
echo "gcc not found! Cloning to ${GCC_64_DIR}..." | |
git clone --depth=1 -b 15 https://github.com/whyakari/aarch64-zyc-linux-gnu ${GCC_64_DIR} | |
fi | |
if ! [ -d "${GCC_32_DIR}" ]; then | |
echo "gcc_32 not found! Cloning to ${GCC_32_DIR}..." | |
git clone --depth=1 -b 15 https://github.com/whyakari/arm-zyc-linux-gnueabi ${GCC_32_DIR} | |
fi | |
- name: Cache Create | |
id: tc-cache | |
uses: MoeKernel/cache/save@v3 | |
with: | |
path: /home/runner/tc | |
key: ${{ runner.os }}-tc |