Skip to content

Bump to r27

Bump to r27 #25

Workflow file for this run

name: Build Toolchain
on:
push:
branches:
- main
tags:
- r**
pull_request:
workflow_dispatch:
jobs:
build:
name: Build Toolchain
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/checkout@main
- name: Free additional disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Build Toolchain
run: bash build.sh
- name: Waiting for debugger
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
- name: Upload Build Archive
uses: actions/upload-artifact@v2
with:
name: output-${{ github.sha }}
path: ${{ github.workspace }}/output
build-flang:
name: Build Flang Libraries
runs-on: ubuntu-22.04
needs: build
strategy:
matrix:
# target_arch_or_type: [host, aarch64, arm, i686, x86_64]
target_arch_or_type: [host, aarch64, x86_64]
steps:
- name: Checkout Repo
uses: actions/checkout@main
- name: Install dependicies
run: |
sudo apt update
sudo apt install -yq cmake ninja-build libzstd-dev
- name: Fetch archives
uses: actions/download-artifact@v2
with:
path: ./
- name: Copy archives
run: |
cp output-${{ github.sha }}/*.tar.bz2 ./
rm -rf output-${{ github.sha }}
- name: Extract Tarballs
run: |
ls *.tar.bz2 | xargs -n1 tar xf
rm -rf *.tar.bz2
- name: Build Flang
env:
BUILD_ARCH_OR_TYPE: ${{ matrix.target_arch_or_type }}
run: bash build-flang.sh
- name: Waiting for debugger
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
- name: Upload Build Archive
uses: actions/upload-artifact@v2
with:
name: output-flang-${{ matrix.target_arch_or_type }}-${{ github.sha }}
path: ${{ github.workspace }}/output-flang
release:
name: Create Github Release
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
needs: build-flang
runs-on: ubuntu-22.04
steps:
- name: Fetch archives
uses: actions/download-artifact@v2
with:
path: ./
- name: Copy archives
run: |
cp output-${{ github.sha }}/*.tar.bz2 ./
cp output-flang-*-${{ github.sha }}/*.tar.bz2 ./
rm -rf output-${{ github.sha }} output-flang-${{ github.sha }}
rm -rf package-llvm-project.tar.bz2 package-stage2-install.tar.bz2
- name: Get checksums
id: checksums
run: |
checksums=$(printf 'SHA-256:\n```\n%s\n```\n' "$(sha256sum *.tar.bz2)")
checksums="${checksums//'%'/'%25'}"
checksums="${checksums//$'\n'/'%0A'}"
checksums="${checksums//$'\r'/'%0D'}"
echo "::set-output name=checksums::$checksums"
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Publish GitHub release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.tar.bz2"
file_glob: true
release_name: "Android NDK toolchain with Flang"
tag: ${{ steps.tag.outputs.tag }}
body: ${{ steps.checksums.outputs.checksums }}