Skip to content

Commit

Permalink
Merge branch 'main' into switch-zone-self-assembling
Browse files Browse the repository at this point in the history
  • Loading branch information
karencfv committed Jul 19, 2024
2 parents 2f7b313 + 708c288 commit 1048969
Show file tree
Hide file tree
Showing 217 changed files with 10,438 additions and 5,082 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# CI scripts:
# - .github/buildomat/build-and-test.sh
# - .github/buildomat/jobs/clippy.sh
# - .github/buildomat/jobs/check-features.sh
# - .github/workflows/rust.yml
#
[build]
Expand Down
34 changes: 34 additions & 0 deletions .github/buildomat/jobs/check-features.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
#:
#: name = "check-features (helios)"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = true
#: output_rules = [
#: "/out/*",
#: ]

# Run the check-features `xtask` on illumos, testing compilation of feature combinations.

set -o errexit
set -o pipefail
set -o xtrace

cargo --version
rustc --version

#
# Set up our PATH for use with this workspace.
#
source ./env.sh
export PATH="$PATH:$PWD/out/cargo-hack"

banner prerequisites
ptime -m bash ./tools/install_builder_prerequisites.sh -y

#
# Check feature combinations with the `cargo xtask check-features` command.
#
banner hack-check
export CARGO_INCREMENTAL=0
ptime -m timeout 2h cargo xtask check-features --ci
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# (that we want to check) is conditionally-compiled on illumos only.
#
# Note that `cargo clippy` includes `cargo check, so this ends up checking all
# of our code.
# of our (default) code.

set -o errexit
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#:
#: name = "helios / deploy"
#: variety = "basic"
#: target = "lab-2.0-opte-0.32"
#: target = "lab-2.0-opte-0.33"
#: output_rules = [
#: "%/var/svc/log/oxide-sled-agent:default.log*",
#: "%/zone/oxz_*/root/var/svc/log/oxide-*.log*",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
toolchain: stable
- name: Install cargo-hakari
uses: taiki-e/install-action@0256b3ea9ae3d751755a35cbb0608979a842f1d2 # v2
uses: taiki-e/install-action@ea7e5189a7664872699532b4cd92a443f520624e # v2
with:
tool: cargo-hakari
- name: Check workspace-hack Cargo.toml is up-to-date
Expand Down
32 changes: 31 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: cargo run --bin omicron-package -- -t default check

# Note that `cargo clippy` includes `cargo check, so this ends up checking all
# of our code.
# of our (default) code.
clippy-lint:
runs-on: ubuntu-22.04
env:
Expand Down Expand Up @@ -82,6 +82,36 @@ jobs:
- name: Run Clippy Lints
run: cargo xtask clippy

check-features:
runs-on: ubuntu-22.04
env:
CARGO_INCREMENTAL: 0
steps:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
run: cargo --version
- name: Update PATH
run: |
set -x
export PATH="./out/cargo-hack:$PATH"
source "./env.sh"; echo "PATH=$PATH" >> "$GITHUB_ENV"
- name: Print PATH
run: echo $PATH
- name: Print GITHUB_ENV
run: cat "$GITHUB_ENV"
- name: Install Pre-Requisites
run: ./tools/install_builder_prerequisites.sh -y
- name: Run Check on Feature Combinations (Feature-Powerset, No-Dev-Deps)
timeout-minutes: 120 # 2 hours
run: cargo xtask check-features --ci

# This is just a test build of docs. Publicly available docs are built via
# the separate "rustdocs" repo.
build-docs:
Expand Down
Loading

0 comments on commit 1048969

Please sign in to comment.