-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (76 loc) · 2.86 KB
/
Copy pathci.yml
File metadata and controls
84 lines (76 loc) · 2.86 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
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
81
82
83
84
name: CI
on:
push:
tags: ["v*"]
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
RUST_LOG: "wind=TRACE"
RUST_TOOLCHAIN: "stable"
RUSTC_BOOTSTRAP: "1"
jobs:
build:
name: Build
uses: rust-proxy/workflows/.github/workflows/rust-build.yml@main
with:
rust-toolchain: "stable"
packages: "wind,tuic-server,tuic-client"
target-config-file: ".github/target.toml"
# The reusable workflow exports this as the `RUSTFLAGS` env var, which
# overrides `.cargo/config.toml [build] rustflags`; mirror the committed
# `--cfg reqwest_unstable` here so it stays enabled in CI (inert unless a
# crate also turns on reqwest's `http3` feature).
rustflags: "--cfg reqwest_unstable"
enable-tmate: false
only-clippy-tests-on-pr: false
# Two constraints:
# 1. GitHub caps the per-repo Actions cache at 10 GB, shared across all
# matrix targets (currently 12) → 10 GB / 12 ≈ 850M each.
# 2. The sccache directory also consumes runner-local disk *during* the
# build, on top of the (large) `target/` tree. The release build with
# the `quiche`/boringssl stack was exhausting the ~14 GB runner disk
# ("No space left on device") at 850M, so keep it well below the cache
# cap to leave build headroom.
# Re-derive if targets are added/removed or the dependency footprint grows.
sccache-max-size: "400M"
release:
name: Release
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')))
needs: [build]
uses: rust-proxy/workflows/.github/workflows/release-publish.yml@main
with:
cliff-config: '.github/cliff.toml'
create-latest-on-push: true
docker_tuic:
name: Docker of TUIC
needs: [build]
uses: rust-proxy/workflows/.github/workflows/docker-publish.yml@main
# secrets:
# registrys: |
# ${{ secrets.DOCKERHUB_USERNAME }}:$${{ secrets.DOCKERHUB_TOKEN }}@docker.io
with:
docker-file: '.github/Dockerfile_TUIC'
image-name: 'tuic-server'
platforms: 'linux/amd64,linux/arm64'
binary-dir: './docker-bins'
server-binary-amd64: 'tuic-server-x86_64-linux-musl'
server-binary-arm64: 'tuic-server-aarch64-linux-musl'
docker:
name: Docker
needs: [build]
uses: rust-proxy/workflows/.github/workflows/docker-publish.yml@main
with:
docker-file: '.github/Dockerfile'
image-name: 'wind'
platforms: 'linux/amd64,linux/arm64'
binary-dir: './docker-bins'
server-binary-amd64: 'wind-x86_64-linux-musl'
server-binary-arm64: 'wind-aarch64-linux-musl'