-
Notifications
You must be signed in to change notification settings - Fork 2
121 lines (102 loc) · 3.56 KB
/
Copy pathci.yml
File metadata and controls
121 lines (102 loc) · 3.56 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
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
111
112
113
114
115
116
117
118
119
120
name: CI
on:
workflow_call:
inputs:
version:
description: 'Version string for the bundle'
required: false
type: string
default: 'ci-unknown'
workflow_dispatch:
pull_request:
merge_group:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout co2
uses: actions/checkout@v4
- name: "node-cleanup"
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo docker builder prune -a
- name: Setup Nushell
uses: hustcer/setup-nu@v3
- name: "copy nushell to /usr/bin"
run: |
sudo cp $(which nu) /usr/bin/
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y bubblewrap gcc build-essential gdb
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
- run: df -h
- name: Run test harness
run: |
source "$HOME/.cargo/env"
cargo run --locked -p co2_test_harness
- name: Run bundle test
run: |
source "$HOME/.cargo/env"
nu ./bundler/test-bundle.nu --version ci-test
- name: Build release bundle artifact
if: github.event_name != 'pull_request'
run: |
VER="${{ inputs.version }}"
if [ -z "$VER" ]; then VER="ci-test"; fi
source "$HOME/.cargo/env"
cargo build -p co2-multicall --release
nu ./bundler/build-bundle.nu --version "$VER"
- name: Upload bundle artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: co2-multicall-linux-x86_64
path: target/co2-multicall.run
if-no-files-found: error
- name: Build CE bundle
if: github.event_name != 'pull_request'
run: |
VER="${{ inputs.version }}"
if [ -z "$VER" ]; then VER="ci-test"; fi
source "$HOME/.cargo/env"
ln -sf co2-multicall target/release/co2cargo
ln -sf co2-multicall target/release/co2miri
nu ./bundler/build-ce-bundle.nu --version "$VER"
- name: Test CE bundle
if: github.event_name != 'pull_request'
run: |
VER="${{ inputs.version }}"
if [ -z "$VER" ]; then VER="ci-test"; fi
source "$HOME/.cargo/env"
nu ./bundler/test-ce-bundle.nu --version "$VER"
- name: Upload CE bundle artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: co2-ce-linux-x86_64
path: target/co2-ce.tar.zstd
if-no-files-found: error
- name: Build rustup bundle
if: github.event_name != 'pull_request'
run: |
VER="${{ inputs.version }}"
if [ -z "$VER" ]; then VER="ci-test"; fi
source "$HOME/.cargo/env"
nu ./bundler/build-rustup-bundle.nu --version "$VER"
- name: Test rustup bundle
if: github.event_name != 'pull_request'
run: |
VER="${{ inputs.version }}"
if [ -z "$VER" ]; then VER="ci-test"; fi
source "$HOME/.cargo/env"
nu ./bundler/test-rustup-bundle.nu --version "$VER"
- name: Upload rustup bundle artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: co2-multicall-rustup-linux-x86_64
path: target/co2-multicall-rustup.run
if-no-files-found: error