forked from wez/wezterm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
110 lines (103 loc) · 4.44 KB
/
.cirrus.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
env:
CIRRUS_CLONE_SUBMODULES: true
CIRRUS_CLONE_DEPTH: 1
task:
name: freebsd-14
compute_engine_instance:
image_project: freebsd-org-cloud-dev
image: family/freebsd-14-0
platform: freebsd
cpu: 4
memory: 8G
disk: 100 # Gb
stateful: false
only_if: "changesInclude('**.toml', '**.rs', '.gitmodules', '.cirrus.yml', 'get-deps', 'Cargo.lock')"
install_rust_script:
- pkg install -y bash
- curl https://sh.rustup.rs -sSf > /tmp/rustup.sh
- chmod +x /tmp/rustup.sh
- RUSTUP_IO_THREADS=1 /tmp/rustup.sh -y -q
getdeps_script:
- env PATH=$HOME/.cargo/bin:$PATH bash get-deps
- mkdir -p /run/sshd
registry_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.lock
target_cache:
folder: target
fingerprint_script:
- rustc --version
- cat Cargo.lock
before_cache_script: rm -rf $CARGO_HOME/registry/index
build_script:
- env PATH=$HOME/.cargo/bin:$PATH cargo build --all --release
test_script:
- env PATH=$HOME/.cargo/bin:$PATH cargo test --all --release
task:
name: ubuntu-22.04-arm
only_if: "$CIRRUS_REPO_OWNER == 'wez' && changesInclude('**.toml', '**.rs', '.gitmodules', '.cirrus.yml', 'get-deps', 'Cargo.lock')"
arm_container:
image: ubuntu:22.04
cpu: 4
memory: 12G
environment:
GITHUB_TOKEN: ENCRYPTED[23bd9513fa7174e74eaddce6a3099cabb22118423591553b23518e8c34bf155e07c559838b1d3422f561c73c1e31e6fc]
FURY_TOKEN: ENCRYPTED[833e7ce9bfd87970b321dd621677f792a65f485b40819cad30258d3a1e1569f9cb4878a2958efecdf40a5050354edd54]
stateful: false
install_rust_script:
- echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- apt update
- apt-get install -y git curl
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
install_gh_cli_script:
- curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg > /usr/share/keyrings/githubcli-archive-keyring.gpg
- chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list
- apt update
- apt install gh -y
- gh --version
getdeps_script:
- env PATH=$HOME/.cargo/bin:$PATH bash get-deps
build_script:
- env PATH=$HOME/.cargo/bin:$PATH cargo build --release -p wezterm-gui -p wezterm -p wezterm-mux-server -p strip-ansi-escapes
- export BUILD_REASON="Schedule"
- export RELEASE="nightly"
- "test -n \"$CIRRUS_TAG\" && BUILD_REASON=\"tag\""
- "test -n \"$CIRRUS_TAG\" && RELEASE=$(ci/tag-name.sh)"
- "./ci/deploy.sh"
- "ls -l *.deb"
- "bash ci/retry.sh gh release upload --clobber ${RELEASE} *.deb"
- "for f in wezterm*.deb ; do curl -i -F package=@$f https://$FURY_TOKEN@push.fury.io/wez/ ; done"
task:
name: debian-12-arm
only_if: "$CIRRUS_REPO_OWNER == 'wez' && changesInclude('**.toml', '**.rs', '.gitmodules', '.cirrus.yml', 'get-deps', 'Cargo.lock')"
arm_container:
image: debian:12
cpu: 4
memory: 12G
environment:
GITHUB_TOKEN: ENCRYPTED[23bd9513fa7174e74eaddce6a3099cabb22118423591553b23518e8c34bf155e07c559838b1d3422f561c73c1e31e6fc]
stateful: false
install_rust_script:
- echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- apt update
- apt-get install -y git curl
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
install_gh_cli_script:
- curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg > /usr/share/keyrings/githubcli-archive-keyring.gpg
- chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list
- apt update
- apt install gh -y
- gh --version
getdeps_script:
- env PATH=$HOME/.cargo/bin:$PATH bash get-deps
build_script:
- env PATH=$HOME/.cargo/bin:$PATH cargo build --release -p wezterm-gui -p wezterm -p wezterm-mux-server -p strip-ansi-escapes
- export BUILD_REASON="Schedule"
- export RELEASE="nightly"
- "test -n \"$CIRRUS_TAG\" && BUILD_REASON=\"tag\""
- "test -n \"$CIRRUS_TAG\" && RELEASE=$(ci/tag-name.sh)"
- "./ci/deploy.sh"
- "ls -l *.deb"
- "bash ci/retry.sh gh release upload --clobber ${RELEASE} *.deb"