BlueGit

ict rusty-teams

Files

rusty-teams / .github / workflows / build.yml

build.yml

build.yml 3.0 KiB Download Raw
1# Builds per README "Quick start": `cargo build -p app`, plus the universal macOS
2# binary from scripts/build-macos.sh. Tests live in test.yml; this file only
3# packages the artifacts.
4name: Build
5
6# Builds run for tags (the release assets); pushes are tested in test.yml.
7on:
8 push:
9 tags: ['*']
10 workflow_dispatch:
11
12permissions:
13 contents: read
14
15concurrency:
16 group: ${{ github.workflow }}-${{ github.ref }}
17 cancel-in-progress: true
18
19env:
20 CARGO_TERM_COLOR: always
21
22jobs:
23 linux:
24 name: Linux
25 runs-on: ubuntu-latest
26 timeout-minutes: 90
27 # webrtc-sys compiles its C++ against the hermetic libc++ inside the libwebrtc
28 # artifact, which needs a clang as new as that libc++ (clang 21 today, see
29 # check_clang_version in vendor/webrtc-sys/build.rs). The distro clang is older
30 # (18 on ubuntu-24.04), so setup-linux installs clang 21 and these point every
31 # compile and the final link at it.
32 env:
33 CC: clang-21
34 CXX: clang++-21
35 CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang-21
36 steps:
37 - uses: actions/checkout@v6
38
39 - uses: ./.github/actions/setup-linux
40
41 - uses: dtolnay/rust-toolchain@stable
42
43 - uses: Swatinem/rust-cache@v2
44 with:
45 key: build
46
47 - name: Build
48 run: cargo build -p app --release
49
50 # The runner is x86_64; the artifact name carries the architecture.
51 - uses: actions/upload-artifact@v7
52 with:
53 name: teams-linux-amd64
54 path: target/release/teams
55
56 windows:
57 name: Windows
58 runs-on: windows-latest
59 timeout-minutes: 90
60 defaults:
61 run:
62 shell: bash
63 steps:
64 - uses: actions/checkout@v6
65
66 - uses: dtolnay/rust-toolchain@stable
67
68 - uses: Swatinem/rust-cache@v2
69 with:
70 key: build
71
72 # After the toolchain: staging runs `cargo metadata`.
73 - uses: ./.github/actions/setup-windows
74
75 # fxc.exe comes from the Windows SDK, gpui-pre-windows finds it through the registry.
76 - name: Build
77 run: cargo build -p app --release --config "patch.crates-io.gpui-pre-windows.path=\"$GPUI_PRE_WINDOWS_PATCHED\""
78
79 # The runner is x86_64; the artifact name carries the architecture.
80 - uses: actions/upload-artifact@v7
81 with:
82 name: teams-windows-amd64
83 path: target/release/teams.exe
84
85 macos:
86 name: macOS
87 runs-on: macos-latest
88 timeout-minutes: 90
89 steps:
90 - uses: actions/checkout@v6
91
92 - uses: dtolnay/rust-toolchain@stable
93
94 - uses: Swatinem/rust-cache@v2
95 with:
96 key: build
97
98 # scripts/build-macos.sh builds the arm64 and x86_64 slices, lipos them into
99 # one universal binary and wraps it in a .app with the icon (README "Quick
100 # start"); it installs the x86_64 rustup target itself and needs Xcode CLT only.
101 - name: Build
102 run: scripts/build-macos.sh crates/app teams
103
104 - uses: actions/upload-artifact@v7
105 with:
106 name: teams-macos
107 path: target/universal/release/teams-macos.zip