|
1 | 1 | gcp_credentials: ENCRYPTED[5ee9e22237c8368fdae53b368a38509d62a168e1b5a8162a9bd8dfef5e874a4f41cd8235d498b99d2c2860c77e06ecd1] |
2 | 2 |
|
| 3 | +gce_instance: |
| 4 | + image_project: ubuntu-os-cloud |
| 5 | + image_family: ubuntu-2404-lts-arm64 |
| 6 | + architecture: arm64 |
| 7 | + zone: us-east1-b |
| 8 | + type: c4a-standard-16 |
| 9 | + disk: 60 |
| 10 | + spot: true |
| 11 | + |
3 | 12 | # -- PR tasks |
4 | 13 |
|
5 | 14 | pr_check_commits_task: |
6 | 15 | skip: $CIRRUS_PR == "" |
7 | 16 | name: (PR) Check commits structure |
| 17 | + alias: pr_check_commits |
8 | 18 | timeout_in: 240m |
9 | | - gce_instance: &arm_vm |
10 | | - image_project: ubuntu-os-cloud |
11 | | - image_family: ubuntu-2404-lts-arm64 |
12 | | - architecture: arm64 |
13 | | - zone: us-east1-b |
14 | | - type: c4a-standard-16 |
15 | | - disk: 60 |
16 | | - spot: true |
17 | 19 | env: |
18 | 20 | GH_TOKEN: "" |
19 | 21 | dependencies_script: |
20 | 22 | - set -eo pipefail |
21 | 23 | # No need to clone. |
22 | 24 | clone_script: [] |
23 | 25 | test_script: | |
24 | | - commits=$(curl -s -H "Accept: application/vnd.github+json" https://api.github.com/repos/CHERIoT-Platform/cheri-rust/pulls/$CIRRUS_PR | jq '.commits') |
| 26 | + url=https://api.github.com/repos/CHERIoT-Platform/cheri-rust/pulls/$CIRRUS_PR |
| 27 | + commits=$(curl -s -H "Accept: application/vnd.github+json" $url | jq '.commits') |
25 | 28 | if [[ $commits -ne 1 ]]; then |
26 | 29 | echo "Expected a single commit, found $commits" |
27 | 30 | echo "In order to facilitate cherry-picking commits into other branches," |
28 | 31 | echo "please squash your commits into a single one." |
29 | 32 | exit 1; |
30 | 33 | fi |
31 | 34 |
|
| 35 | +# -- End PR tasks |
| 36 | + |
32 | 37 | x_check_task: |
33 | 38 | name: Run ./x check |
| 39 | + alias: x_check |
34 | 40 | # TODO(xdoardo): Figure out when it makes sense to have this dependency, or |
35 | 41 | # how that dependency should actually work. Having this dependency would |
36 | 42 | # pretty much mean making every PR that merges changes on `beta` to `master` |
37 | 43 | # to have failing CI, which would be the reason why we want to make PRs and |
38 | 44 | # not direct pushes in the first place. |
39 | 45 | # depends_on: (PR) Check commits structure |
40 | 46 | timeout_in: 240m |
41 | | - gce_instance: &arm_vm |
42 | | - image_project: ubuntu-os-cloud |
43 | | - image_family: ubuntu-2404-lts-arm64 |
44 | | - architecture: arm64 |
45 | | - zone: us-east1-b |
46 | | - type: c4a-standard-16 |
47 | | - disk: 60 |
48 | | - spot: true |
49 | | - env: |
50 | | - CIRRUS_CLONE_DEPTH: 0 |
51 | | - |
52 | 47 | dependencies_script: |
53 | 48 | - set -eo pipefail |
54 | 49 | - apt-get update |
55 | 50 | - apt-get install -y clang ninja-build lld cmake ccache perl |
56 | 51 | gen_bootstrap_script: ./cheri/gen_bootstrap.sh |
57 | 52 | setup_env_script: |
58 | | - - export CCACHE_REMOTE_STORAGE="http://${CIRRUS_HTTP_CACHE_HOST}/${CIRRUS_OS}/" |
59 | | - - export CCACHE_REMOTE_ONLY=1 |
60 | | - - env |
| 53 | + - echo "CCACHE_REMOTE_STORAGE=http://${CIRRUS_HTTP_CACHE_HOST}/${CIRRUS_OS}/" >> $CIRRUS_ENV |
| 54 | + - echo "CCACHE_REMOTE_ONLY=1" >> $CIRRUS_ENV |
| 55 | + check_env_script: env |
61 | 56 | pull_master_script: git fetch origin master:refs/remotes/origin/master |
62 | 57 | tidy_script: CC="clang" CXX="clang++" ./x test tidy |
63 | 58 | check_script: CC="clang" CXX="clang++" ./x check |
64 | 59 | ui_test_script: CC="clang" CXX="clang++" ./x test ui |
65 | 60 |
|
66 | 61 | build_core_task: |
67 | 62 | name: Build `core` library for `riscv32cheriot-unknown-cheriotrtos` |
| 63 | + alias: build_core |
68 | 64 | depends_on: |
69 | | - - Run ./x check |
| 65 | + - x_check |
70 | 66 | timeout_in: 240m |
71 | | - gce_instance: &arm_vm |
72 | | - image_project: ubuntu-os-cloud |
73 | | - image_family: ubuntu-2404-lts-arm64 |
74 | | - architecture: arm64 |
75 | | - zone: us-east1-b |
76 | | - type: c4a-standard-16 |
77 | | - disk: 60 |
78 | | - spot: true |
79 | 67 | env: |
80 | | - CIRRUS_CLONE_DEPTH: 0 |
81 | | - |
| 68 | + CIRRUS_CLONE_DEPTH: "1" |
82 | 69 | dependencies_script: |
83 | 70 | - set -eo pipefail |
84 | 71 | - apt-get update |
85 | 72 | - apt-get install -y clang ninja-build lld cmake ccache perl |
86 | 73 | gen_bootstrap_script: ./cheri/gen_bootstrap.sh |
87 | 74 | setup_env_script: |
88 | | - - export CCACHE_REMOTE_STORAGE="http://${CIRRUS_HTTP_CACHE_HOST}/${CIRRUS_OS}/" |
89 | | - - export CCACHE_REMOTE_ONLY=1 |
90 | | - - env |
91 | | - pull_master_script: git fetch origin master:refs/remotes/origin/master |
| 75 | + - echo "CCACHE_REMOTE_STORAGE=http://${CIRRUS_HTTP_CACHE_HOST}/${CIRRUS_OS}/" >> $CIRRUS_ENV |
| 76 | + - echo "CCACHE_REMOTE_ONLY=1" >> $CIRRUS_ENV |
| 77 | + check_env_script: env |
| 78 | + pull_master_script: git fetch origin master:refs/remotes/origin/master --depth 1 |
92 | 79 | build_script: CC="clang" CXX="clang++" ./x build compiler std --target=riscv32cheriot-unknown-cheriotrtos |
93 | 80 |
|
94 | 81 | run_cheri_tests_task: |
95 | 82 | name: Run CHERIoT-specific tests |
| 83 | + alias: run_cheri_tests |
96 | 84 | depends_on: |
97 | | - - Build `core` library for `riscv32cheriot-unknown-cheriotrtos` |
| 85 | + - build_core |
98 | 86 | timeout_in: 240m |
99 | | - gce_instance: &arm_vm |
100 | | - image_project: ubuntu-os-cloud |
101 | | - image_family: ubuntu-2404-lts-arm64 |
102 | | - architecture: arm64 |
103 | | - zone: us-east1-b |
104 | | - type: c4a-standard-16 |
105 | | - disk: 60 |
106 | | - spot: true |
107 | 87 | env: |
108 | | - CIRRUS_CLONE_DEPTH: 0 |
109 | | - CARGO_HOME: /tmp/cargo |
110 | | - RUSTUP_HOME: /tmp/cargo |
111 | | - XMAKE_ROOT: "y" |
112 | | - |
| 88 | + CIRRUS_CLONE_DEPTH: "1" |
| 89 | + CARGO_HOME: /tmp/cargo |
| 90 | + RUSTUP_HOME: /tmp/cargo |
| 91 | + XMAKE_ROOT: "y" |
113 | 92 | dependencies_script: |
114 | 93 | - set -eo pipefail |
115 | 94 | - apt-get update |
116 | 95 | - apt-get install -y clang ninja-build lld cmake ccache perl opam z3 libgmp-dev |
117 | 96 | install_xmake_script: curl -fsSL https://xmake.io/shget.text | bash || true # The installer will fail without any informations. |
118 | | - verify_xmake_script: /root/.local/bin/xmake -v |
119 | | - install_rust_script: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y && . "$CARGO_HOME/env" |
| 97 | + verify_xmake_script: /root/.local/bin/xmake --version |
| 98 | + install_rust_script: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y |
120 | 99 | verify_rust_script: . "$CARGO_HOME/env" && cargo --version |
121 | | - build_sail_sim_script: git clone --recurse-submodules --depth=1 https://github.com/CHERIoT-Platform/cheriot-sail && cd cheriot-sail && opam init --reinit --bypass-check --disable-sandboxing --disable-shell-hook && eval $(opam env) && opam install sail --confirm-level=unsafe-yes && make csim && cp c_emulator/cheriot_sim /usr/local/bin |
| 100 | + build_sail_sim_script: |
| 101 | + - git clone --recurse-submodules --depth=1 https://github.com/CHERIoT-Platform/cheriot-sail |
| 102 | + - opam init --reinit --bypass-check --disable-sandboxing --disable-shell-hook |
| 103 | + - eval $(opam env) |
| 104 | + - opam install sail --confirm-level=unsafe-yes |
| 105 | + - cd cheriot-sail && make csim && cp c_emulator/cheriot_sim /usr/local/bin |
122 | 106 | gen_bootstrap_script: ./cheri/gen_bootstrap.sh --build-clang |
123 | 107 | setup_env_script: |
124 | | - - export CCACHE_REMOTE_STORAGE="http://${CIRRUS_HTTP_CACHE_HOST}/${CIRRUS_OS}/" |
125 | | - - export CCACHE_REMOTE_ONLY=1 |
126 | | - - env |
127 | | - pull_master_script: git fetch origin master:refs/remotes/origin/master |
| 108 | + - echo "CCACHE_REMOTE_STORAGE=http://${CIRRUS_HTTP_CACHE_HOST}/${CIRRUS_OS}/" >> $CIRRUS_ENV |
| 109 | + - echo "CCACHE_REMOTE_ONLY=1" >> $CIRRUS_ENV |
| 110 | + check_env_script: env |
| 111 | + pull_master_script: git fetch origin master:refs/remotes/origin/master --depth 1 |
128 | 112 | build_rustc_script: CC="clang" CXX="clang++" ./x build compiler std --target=riscv32cheriot-unknown-cheriotrtos |
129 | 113 | build_test_runner_script: cd ./cheri/tests/runner && . "$CARGO_HOME/env" && cargo build --release |
130 | | - run_tests_script: cd ./cheri/tests && ./runner/target/release/cheriot-runner -vvvvv . --sysroot=../../build/host/llvm --rustc=../../build/host/stage1/bin/rustc --xmake=/root/.local/bin/xmake |
131 | | -# -- End PR tasks |
| 114 | + run_tests_script: cd ./cheri/tests && ./runner/target/release/cheriot-runner -vvvvv . |
| 115 | + --sysroot=../../build/host/llvm |
| 116 | + --rustc=../../build/host/stage1/bin/rustc |
| 117 | + --xmake=/root/.local/bin/xmake |
0 commit comments