gh: Run release workflow on Arch Linux container and build with LLVM

This commit is contained in:
mintsuki 2022-06-25 08:50:29 +02:00
parent ff9649f65f
commit 874db16cf6
1 changed files with 11 additions and 9 deletions

View File

@ -8,26 +8,27 @@ on:
jobs: jobs:
build: build:
name: Build and upload artifacts name: Build and upload artifacts
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
container: archlinux:latest
steps: steps:
- name: Install dependencies
run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel git autoconf automake nasm curl mtools llvm clang lld mingw-w64-gcc openssh
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: '0' fetch-depth: '0'
- name: Git config
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Get tag name - name: Get tag name
run: echo "TAG_NAME=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))" >> $GITHUB_ENV run: echo "TAG_NAME=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))" >> $GITHUB_ENV
- name: Get branch name - name: Get branch name
run: echo "BRANCH_NAME=$(echo "$TAG_NAME" | grep -o 'v[0-9]\+\.')0-branch" >> $GITHUB_ENV run: echo "BRANCH_NAME=$(echo "$TAG_NAME" | grep -o 'v[0-9]\+\.')0-branch" >> $GITHUB_ENV
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install git build-essential autoconf automake nasm gcc-mingw-w64 curl mtools -y
- name: Build the toolchain
run: ./make_toolchain.sh
- name: Regenerate - name: Regenerate
run: ./bootstrap run: ./bootstrap
@ -35,7 +36,7 @@ jobs:
run: mkdir -p build run: mkdir -p build
- name: Configure - name: Configure
run: cd build && ../configure --enable-all run: cd build && ../configure --enable-all TOOLCHAIN=llvm
- name: Build the bootloader - name: Build the bootloader
run: make -C build run: make -C build
@ -65,6 +66,7 @@ jobs:
run: | run: |
git config user.name 'mintsuki' git config user.name 'mintsuki'
git config user.email 'mintsuki@users.noreply.github.com' git config user.email 'mintsuki@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/limine-bootloader/limine.git
git fetch --all git fetch --all
git checkout $BRANCH_NAME-binary || git checkout --orphan $BRANCH_NAME-binary git checkout $BRANCH_NAME-binary || git checkout --orphan $BRANCH_NAME-binary
rm -rf $(ls -a | grep -v '^\.git$' | grep -v '^\.\.$' | grep -v '^\.$' | grep -v '^build$') rm -rf $(ls -a | grep -v '^\.git$' | grep -v '^\.\.$' | grep -v '^\.$' | grep -v '^build$')