Skip to content

Commit 9f4fd4d

Browse files
committed
Initial commit
0 parents  commit 9f4fd4d

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

.github/workflows/build.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: build
13+
runs-on: ubuntu-latest
14+
steps:
15+
16+
- name: checkout
17+
uses: actions/checkout@v4
18+
19+
- name: setup-apt-llvm
20+
uses: ./
21+
22+
- name: test-apt-llvm
23+
run: |
24+
sudo apt install -y \
25+
clang-19 \
26+
clang-18 \
27+
clang-17 \
28+
clang-16

action.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: setup-apt-llvm
2+
description: Setup apt.llvm.org repositories
3+
runs:
4+
using: composite
5+
steps:
6+
- if: ${{ runner.os == 'Linux' }}
7+
run: ${{ github.action_path }}/setup.sh
8+
shell: bash

setup.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
LSB_CODENAME=$(lsb_release -cs)
6+
7+
curl -f -L --retry 5 https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-snapshot.gpg
8+
9+
{
10+
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/$LSB_CODENAME llvm-toolchain-$LSB_CODENAME main"
11+
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/$LSB_CODENAME llvm-toolchain-$LSB_CODENAME-18 main"
12+
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/$LSB_CODENAME llvm-toolchain-$LSB_CODENAME-17 main"
13+
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/$LSB_CODENAME llvm-toolchain-$LSB_CODENAME-16 main"
14+
} | sudo tee /etc/apt/sources.list.d/llvm-toolchain.list
15+
16+
sudo apt update

0 commit comments

Comments
 (0)