forked from MaterializeInc/toolchains
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.35 KB
/
linux-sysroot.yml
File metadata and controls
49 lines (42 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
workflow_dispatch:
inputs:
github_tag:
description: "Tag to upload the release to."
type: string
required: true
name: Linux Sysroots
jobs:
build_sysroots:
name: build linux sysroots
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Clone scufflecloud/toolchains repo
uses: actions/checkout@v4
- name: Get args
run: |
GITHUB_TAG=$(tr '[:upper:]' '[:lower:]' <<< "sysroot-$KERNEL_TAG-$GLIBC_TAG-$LIBSTDCXX_TAG")
echo "GITHUB_TAG=$GITHUB_TAG" >> $GITHUB_ENV
- name: Install nix
uses: DeterminateSystems/nix-installer-action@main
- name: Build Sysroot with nix
run: |
nix-shell \
./sysroot/shell.nix \
--run './sysroot/bazel-cc-sysroot-generator --config ./sysroot/sysroot-config.toml'
- name: Determine Release Tag
run: |
RELEASE_TAG="linux-$GITHUB_TAG"
if [ -n "${{ inputs.github_tag }}" ]; then
RELEASE_TAG="${{ inputs.github_tag }}"
fi
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
- name: Upload Artifacts to Release
uses: svenstaro/upload-release-action@v2
with:
file: "linux-sysroot*.tar.zst"
file_glob: true
tag: ${{ env.RELEASE_TAG }}
overwrite: true