Skip to content

Toolchain Builder

Toolchain Builder #90

name: Toolchain Builder
# REGENERATES THE LLVM-MINGW for Alpine Linux with fresh code.
on:
schedule:
- cron: '51 10 * * SAT'
# runs at 10:51 UTC every Saturday
workflow_dispatch:
inputs:
debug_enabled:
description: 'Debug session enabled'
required: false
default: false
type: boolean
jobs:
build:
if: ${{ true }}
name: Builds toolchain
runs-on: ubuntu-latest
container: alpine:edge
defaults:
run:
shell: bash
steps:
- name: "⏬ Download tools"
if: ${{ job.container }}
shell: sh
run: |
apk update && apk upgrade
apk add git bash curl jq tar \
build-base python3 cmake linux-headers coreutils perl
# set PATH like in Ubuntu
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
- name: "🔧 Prepare debug session"
if: github.event.inputs.debug_enabled == 'true'
run: |
apk add bash nano-syntax iproute2 util-linux-misc
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
chmod +x /usr/local/bin/oh-my-posh
wget -q https://github.com/okibcn/miniU/raw/main/Github_Linux/.nanorc -O /etc/nanorc
wget -q https://github.com/okibcn/miniU/raw/main/Github_Linux/profile.sh -O ~/.zshrc
cat ~/.zshrc >> ~/.bashrc
- name: "🐞 Debug session"
uses: mxschmitt/action-tmate@v3
if: github.event.inputs.debug_enabled == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "⚙️ Build LLVM-MinGW Master"
run: |
echo " Using SHELL: $0"
git clone https://github.com/mstorsjo/llvm-mingw.git llvm
cd llvm
./build-all.sh ../llvm-mingw
- name: "🚮 Recycle Cache"
uses: snnaplab/delete-branch-cache-action@v1
- name: "💾 Save Build Folder"
uses: actions/cache@v3.3.1
id: cache-folder
with:
key: llvm-folder
path: llvm-mingw