Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TerrorJack committed Apr 8, 2024
0 parents commit 9f4fd4d
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:

- name: checkout
uses: actions/checkout@v4

- name: setup-apt-llvm
uses: ./

- name: test-apt-llvm
run: |
sudo apt install -y \
clang-19 \
clang-18 \
clang-17 \
clang-16
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: setup-apt-llvm
description: Setup apt.llvm.org repositories
runs:
using: composite
steps:
- if: ${{ runner.os == 'Linux' }}
run: ${{ github.action_path }}/setup.sh
shell: bash
16 changes: 16 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -euo pipefail

LSB_CODENAME=$(lsb_release -cs)

curl -f -L --retry 5 https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-snapshot.gpg

{
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/$LSB_CODENAME llvm-toolchain-$LSB_CODENAME main"
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/$LSB_CODENAME llvm-toolchain-$LSB_CODENAME-18 main"
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/$LSB_CODENAME llvm-toolchain-$LSB_CODENAME-17 main"
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/$LSB_CODENAME llvm-toolchain-$LSB_CODENAME-16 main"
} | sudo tee /etc/apt/sources.list.d/llvm-toolchain.list

sudo apt update

0 comments on commit 9f4fd4d

Please sign in to comment.