forked from vercel/turborepo
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (71 loc) · 2.89 KB
/
lsp.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Turborepo LSP Pipeline
#
# Currently this just dumps the LSP binaries into the artifacts, but in the future
# we will want to do the entire packaging process here.
name: Turborepo LSP
on:
workflow_dispatch:
jobs:
build-rust:
name: "Build Rust"
strategy:
fail-fast: false
matrix:
settings:
- host: macos-13
target: "x86_64-apple-darwin"
container-options: "--rm"
- host: macos-13
target: "aarch64-apple-darwin"
container-options: "--rm"
- host: ubuntu-latest
container-options: "--platform=linux/amd64 --rm"
container-setup: "sudo apt-get update && sudo apt-get install -y curl musl-tools"
target: "x86_64-unknown-linux-musl"
setup: "sudo apt-get install -y build-essential"
- host: ubuntu-latest
container-options: "--rm"
target: "aarch64-unknown-linux-musl"
rust-build-env: 'CC_aarch64_unknown_linux_musl=clang AR_aarch64_unknown_linux_musl=llvm-ar RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld"'
setup: "sudo apt-get update && sudo apt-get install -y build-essential musl-tools clang llvm gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu"
- host: windows-latest
target: x86_64-pc-windows-msvc
setup: "rustup set default-host x86_64-pc-windows-msvc"
container-options: "--rm"
- host: windows-latest
target: aarch64-pc-windows-msvc
setup: "rustup set default-host aarch64-pc-windows-msvc"
container-options: "--rm"
runs-on: ${{ matrix.settings.host }}
container:
image: ${{ matrix.settings.container }}
options: ${{ matrix.settings.container-options }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Container
if: ${{ matrix.settings.container-setup }}
run: ${{ matrix.settings.container-setup }}
- name: Setup Protoc
uses: arduino/setup-protoc@v3
with:
version: "26.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup capnproto
uses: ./.github/actions/setup-capnproto
- name: Rust Setup
uses: ./.github/actions/setup-rust
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
targets: ${{ matrix.settings.target }}
- name: Build Setup
shell: bash
if: ${{ matrix.settings.setup }}
run: ${{ matrix.settings.setup }}
- name: Build
run: ${{ matrix.settings.rust-build-env }} cargo build --profile release-turborepo-lsp -p turborepo-lsp --target ${{ matrix.settings.target }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: turborepo-lsp-${{ matrix.settings.target }}
path: target/${{ matrix.settings.target }}/release-turborepo-lsp/turborepo-lsp*