-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
54 lines (49 loc) · 1.95 KB
/
action.yml
File metadata and controls
54 lines (49 loc) · 1.95 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
50
51
52
53
54
name: Setup C++23 Toolchain
description: Install xlings and C++23 toolchain for the current platform
runs:
using: composite
steps:
- name: Setup (linux)
if: runner.os == 'Linux'
shell: bash
run: |
LATEST_VERSION=$(gh release view --repo d2learn/xlings --json tagName -q '.tagName')
VERSION_NUM=${LATEST_VERSION#v}
TARBALL="xlings-${VERSION_NUM}-linux-x86_64.tar.gz"
gh release download "$LATEST_VERSION" --repo d2learn/xlings --pattern "$TARBALL" --dir /tmp
mkdir -p "$HOME/.xlings"
tar -xzf "/tmp/$TARBALL" -C "$HOME/.xlings" --strip-components=1
"$HOME/.xlings/bin/xlings" self install
env:
GH_TOKEN: ${{ github.token }}
- name: Setup (macos)
if: runner.os == 'macOS'
shell: bash
run: |
LATEST_VERSION=$(gh release view --repo d2learn/xlings --json tagName -q '.tagName')
VERSION_NUM=${LATEST_VERSION#v}
ARCH=$(uname -m)
TARBALL="xlings-${VERSION_NUM}-macosx-${ARCH}.tar.gz"
gh release download "$LATEST_VERSION" --repo d2learn/xlings --pattern "$TARBALL" --dir /tmp
mkdir -p "$HOME/.xlings"
tar -xzf "/tmp/$TARBALL" -C "$HOME/.xlings" --strip-components=1
xattr -dr com.apple.quarantine "$HOME/.xlings" 2>/dev/null || true
"$HOME/.xlings/bin/xlings" self install
env:
GH_TOKEN: ${{ github.token }}
- name: Setup (windows)
if: runner.os == 'Windows'
shell: pwsh
run: irm https://raw.githubusercontent.com/d2learn/xlings/refs/heads/main/tools/other/quick_install.ps1 | iex
- name: Install toolchain (linux)
if: runner.os == 'Linux'
shell: bash
run: |
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xlings install gcc@15 -y
- name: Install toolchain (macos)
if: runner.os == 'macOS'
shell: bash
run: |
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xlings install llvm@20 -y