From 632fce2009c8d6130af85e73543aac39ea6de05c Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Fri, 28 Jun 2024 17:39:18 +0100 Subject: [PATCH 01/11] simplify make actions --- .github/workflows/004-ubuntu-make-prcheck.yml | 94 +++++++++++++++++++ Makefile | 21 ++--- 2 files changed, 102 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/004-ubuntu-make-prcheck.yml diff --git a/.github/workflows/004-ubuntu-make-prcheck.yml b/.github/workflows/004-ubuntu-make-prcheck.yml new file mode 100644 index 000000000..e615e63f5 --- /dev/null +++ b/.github/workflows/004-ubuntu-make-prcheck.yml @@ -0,0 +1,94 @@ +# ---------------------------------------------------------------------------- # +# # +# +--------------------------------------------+ # +# | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # +# | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # +# | ███████║██║ ██║██████╔╝███████║█████╗ | # +# | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # +# | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # +# | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # +# +--------------------------------------------+ # +# # +# Distributed Systems Runtime # +# # +# ---------------------------------------------------------------------------- # +# # +# Copyright 2022 - 2024, the Aurae contributors # +# SPDX-License-Identifier: Apache-2.0 # +# # +# ---------------------------------------------------------------------------- # +# +# This is the main PR check for aurae +# +# This build check will introduce confidence for the following: +# +# - That the code does not warn (due to clippy errors/warnings) +# +name: "(004) [ubuntu:latest] [prcheck]" +on: + push: + branches: main + pull_request: + branches: main +env: + CARGO_TERM_COLOR: always +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: bufbuild/buf-setup-action@v1 + with: + github_token: ${{ github.token }} + version: 1.32.0 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: 000-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + 000-${{ runner.os }}-cargo- + - name: Install rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: clippy, rustfmt + - name: Install protoc-gen-doc in [ubuntu:latest] + run: | + wget https://github.com/pseudomuto/protoc-gen-doc/releases/download/v1.5.1/protoc-gen-doc_1.5.1_linux_amd64.tar.gz + tar -xzf protoc-gen-doc_1.5.1_linux_amd64.tar.gz + chmod +x protoc-gen-doc + cp protoc-gen-doc /usr/local/bin/protoc-gen-doc + sudo apt-get update + sudo apt-get install -y protobuf-compiler + - name: Install compile time dependencies (musl-tools) in [ubuntu:latest] + # + # Do not add GNU libraries here! Do not add GNU libraries here! + # + # Please (seriously please) be careful about adding commands here. + # This is our core way of validating that our binary is "healthy" + # If we need to install anything with the word "lib" in it to get + # the build to pass, we likely should be having other discussions + # instead of adding commands here. + # + # Do not add GNU libraries here! Do not add GNU libraries here! + # + # For example, we should NOT be adding libraries such as "libseccomp" + # or "libdbus". + # + # If in doubt, please ask in Discord in the build channel. + # + # Do not at GNU libraries here! Do not add GNU libraries here! + run: | + sudo apt-get update + sudo apt-get install -y musl-tools + - name: PR Check + # This should remain the only command we execute as this matches the title of the file. + # The goal is for this to be easy to find from the GitHub dashboard. + # Instead of adding more commands here, consider another make target or a new YAML file + # named with a good name. + run: make prcheck diff --git a/Makefile b/Makefile index e49d642e6..4b7b2f7f9 100644 --- a/Makefile +++ b/Makefile @@ -60,12 +60,7 @@ export GIT_PAGER = cat # Keep all as the first command to have it be the default as per convention .PHONY: all -all: install ## alias for install - -# ⚠️ DO NOT REMOVE ⚠️ -.PHONY: nova -nova: auraed aer auraescript ## The official Kris Nóva alias for her workflow that only exists in her head. -# ⚠️ DO NOT REMOVE ⚠️ +all: build dir := $(dir $(lastword $(MAKEFILE_LIST))) include $(dir)/hack/_common.mk @@ -88,16 +83,16 @@ clean: clean-certs clean-gens clean-crates ## Clean the repo lint: musl auraed-lint not-auraed-lint ## Run all lints .PHONY: test -test: musl auraed-build auraed-lint auraed-test not-auraed-build not-auraed-lint not-auraed-test ## Builds, lints, and tests (does not include ignored tests) +test: musl lint build auraed-test not-auraed-test ## Builds, lints, and tests (does not include ignored tests) .PHONY: test-all -test-all: musl auraed-build auraed-lint auraed-test-all not-auraed-build not-auraed-lint not-auraed-test-all ## Run lints and tests (includes ignored tests) +test-all: musl lint build auraed-test-all not-auraed-test-all ## Run lints and tests (includes ignored tests) .PHONY: build -build: musl auraed-build auraed-lint not-auraed-build not-auraed-lint ## Build and lint +build: musl auraed-build not-auraed-build ## Build and lint .PHONY: install -install: musl lint test auraed-debug auraescript-debug aer-debug ## Lint, test, and install (debug) 🎉 +install: musl test auraed-debug auraescript-debug aer-debug ## Lint, test, and install (debug) 🎉 .PHONY: docs docs: docs-crates docs-stdlib docs-other ## Assemble all the /docs for the website locally. @@ -205,15 +200,15 @@ $(1)-lint: musl $(GEN_RS) $(GEN_TS) $$(cargo) clippy $(2) -p $(1) --all-features -- -D clippy::all -D warnings .PHONY: $(1)-test -$(1)-test: musl $(GEN_RS) $(GEN_TS) auraed +$(1)-test: musl $(GEN_RS) $(GEN_TS) auraed-debug $(cargo) test $(2) -p $(1) .PHONY: $(1)-test-all -$(1)-test-all: musl $(GEN_RS) $(GEN_TS) auraed +$(1)-test-all: musl $(GEN_RS) $(GEN_TS) auraed-debug $(root_cargo) test $(2) -p $(1) -- --include-ignored .PHONY: $(1)-test-integration -$(1)-test-integration: musl $(GEN_RS) $(GEN_TS) auraed +$(1)-test-integration: musl $(GEN_RS) $(GEN_TS) auraed-debug $(root_cargo) test $(2) -p $(1) --test '*' -- --include-ignored .PHONY: $(1)-test-watch From 58be529be470015c9f93488af5607cb0c479b491 Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Fri, 28 Jun 2024 17:42:12 +0100 Subject: [PATCH 02/11] rename prcheck action --- .github/workflows/004-ubuntu-make-prcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/004-ubuntu-make-prcheck.yml b/.github/workflows/004-ubuntu-make-prcheck.yml index e615e63f5..0a5d43c18 100644 --- a/.github/workflows/004-ubuntu-make-prcheck.yml +++ b/.github/workflows/004-ubuntu-make-prcheck.yml @@ -24,7 +24,7 @@ # # - That the code does not warn (due to clippy errors/warnings) # -name: "(004) [ubuntu:latest] [prcheck]" +name: "PR check (004) [ubuntu:latest] [prcheck]" on: push: branches: main From 6fa4a925c3981316a818a2c6be547262b2b8ee4d Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Tue, 2 Jul 2024 10:41:02 +0100 Subject: [PATCH 03/11] find cargo before running as sudo --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4b7b2f7f9..e74986acc 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ vm_image = https://cloud-images.ubuntu.com/focal/current/focal-server-cloud ifeq ($(uid), 0) root_cargo = cargo else -root_cargo = sudo -E cargo + root_cargo = sudo -E `which cargo` endif # Configuration Options @@ -197,7 +197,7 @@ $(1): musl $(GEN_RS) $(GEN_TS) $(1)-lint $(1)-debug ## Lint and install $(1) (fo .PHONY: $(1)-lint $(1)-lint: musl $(GEN_RS) $(GEN_TS) - $$(cargo) clippy $(2) -p $(1) --all-features -- -D clippy::all -D warnings + $(cargo) clippy $(2) -p $(1) --all-features -- -D clippy::all -D warnings .PHONY: $(1)-test $(1)-test: musl $(GEN_RS) $(GEN_TS) auraed-debug From 6c8bb0199440d42a5445144674065b21041c6df6 Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Fri, 28 Jun 2024 17:39:18 +0100 Subject: [PATCH 04/11] simplify make actions --- .github/workflows/004-ubuntu-make-prcheck.yml | 94 +++++++++++++++++++ Makefile | 21 ++--- 2 files changed, 102 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/004-ubuntu-make-prcheck.yml diff --git a/.github/workflows/004-ubuntu-make-prcheck.yml b/.github/workflows/004-ubuntu-make-prcheck.yml new file mode 100644 index 000000000..e615e63f5 --- /dev/null +++ b/.github/workflows/004-ubuntu-make-prcheck.yml @@ -0,0 +1,94 @@ +# ---------------------------------------------------------------------------- # +# # +# +--------------------------------------------+ # +# | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # +# | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # +# | ███████║██║ ██║██████╔╝███████║█████╗ | # +# | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # +# | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # +# | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # +# +--------------------------------------------+ # +# # +# Distributed Systems Runtime # +# # +# ---------------------------------------------------------------------------- # +# # +# Copyright 2022 - 2024, the Aurae contributors # +# SPDX-License-Identifier: Apache-2.0 # +# # +# ---------------------------------------------------------------------------- # +# +# This is the main PR check for aurae +# +# This build check will introduce confidence for the following: +# +# - That the code does not warn (due to clippy errors/warnings) +# +name: "(004) [ubuntu:latest] [prcheck]" +on: + push: + branches: main + pull_request: + branches: main +env: + CARGO_TERM_COLOR: always +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: bufbuild/buf-setup-action@v1 + with: + github_token: ${{ github.token }} + version: 1.32.0 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: 000-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + 000-${{ runner.os }}-cargo- + - name: Install rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: clippy, rustfmt + - name: Install protoc-gen-doc in [ubuntu:latest] + run: | + wget https://github.com/pseudomuto/protoc-gen-doc/releases/download/v1.5.1/protoc-gen-doc_1.5.1_linux_amd64.tar.gz + tar -xzf protoc-gen-doc_1.5.1_linux_amd64.tar.gz + chmod +x protoc-gen-doc + cp protoc-gen-doc /usr/local/bin/protoc-gen-doc + sudo apt-get update + sudo apt-get install -y protobuf-compiler + - name: Install compile time dependencies (musl-tools) in [ubuntu:latest] + # + # Do not add GNU libraries here! Do not add GNU libraries here! + # + # Please (seriously please) be careful about adding commands here. + # This is our core way of validating that our binary is "healthy" + # If we need to install anything with the word "lib" in it to get + # the build to pass, we likely should be having other discussions + # instead of adding commands here. + # + # Do not add GNU libraries here! Do not add GNU libraries here! + # + # For example, we should NOT be adding libraries such as "libseccomp" + # or "libdbus". + # + # If in doubt, please ask in Discord in the build channel. + # + # Do not at GNU libraries here! Do not add GNU libraries here! + run: | + sudo apt-get update + sudo apt-get install -y musl-tools + - name: PR Check + # This should remain the only command we execute as this matches the title of the file. + # The goal is for this to be easy to find from the GitHub dashboard. + # Instead of adding more commands here, consider another make target or a new YAML file + # named with a good name. + run: make prcheck diff --git a/Makefile b/Makefile index e49d642e6..4b7b2f7f9 100644 --- a/Makefile +++ b/Makefile @@ -60,12 +60,7 @@ export GIT_PAGER = cat # Keep all as the first command to have it be the default as per convention .PHONY: all -all: install ## alias for install - -# ⚠️ DO NOT REMOVE ⚠️ -.PHONY: nova -nova: auraed aer auraescript ## The official Kris Nóva alias for her workflow that only exists in her head. -# ⚠️ DO NOT REMOVE ⚠️ +all: build dir := $(dir $(lastword $(MAKEFILE_LIST))) include $(dir)/hack/_common.mk @@ -88,16 +83,16 @@ clean: clean-certs clean-gens clean-crates ## Clean the repo lint: musl auraed-lint not-auraed-lint ## Run all lints .PHONY: test -test: musl auraed-build auraed-lint auraed-test not-auraed-build not-auraed-lint not-auraed-test ## Builds, lints, and tests (does not include ignored tests) +test: musl lint build auraed-test not-auraed-test ## Builds, lints, and tests (does not include ignored tests) .PHONY: test-all -test-all: musl auraed-build auraed-lint auraed-test-all not-auraed-build not-auraed-lint not-auraed-test-all ## Run lints and tests (includes ignored tests) +test-all: musl lint build auraed-test-all not-auraed-test-all ## Run lints and tests (includes ignored tests) .PHONY: build -build: musl auraed-build auraed-lint not-auraed-build not-auraed-lint ## Build and lint +build: musl auraed-build not-auraed-build ## Build and lint .PHONY: install -install: musl lint test auraed-debug auraescript-debug aer-debug ## Lint, test, and install (debug) 🎉 +install: musl test auraed-debug auraescript-debug aer-debug ## Lint, test, and install (debug) 🎉 .PHONY: docs docs: docs-crates docs-stdlib docs-other ## Assemble all the /docs for the website locally. @@ -205,15 +200,15 @@ $(1)-lint: musl $(GEN_RS) $(GEN_TS) $$(cargo) clippy $(2) -p $(1) --all-features -- -D clippy::all -D warnings .PHONY: $(1)-test -$(1)-test: musl $(GEN_RS) $(GEN_TS) auraed +$(1)-test: musl $(GEN_RS) $(GEN_TS) auraed-debug $(cargo) test $(2) -p $(1) .PHONY: $(1)-test-all -$(1)-test-all: musl $(GEN_RS) $(GEN_TS) auraed +$(1)-test-all: musl $(GEN_RS) $(GEN_TS) auraed-debug $(root_cargo) test $(2) -p $(1) -- --include-ignored .PHONY: $(1)-test-integration -$(1)-test-integration: musl $(GEN_RS) $(GEN_TS) auraed +$(1)-test-integration: musl $(GEN_RS) $(GEN_TS) auraed-debug $(root_cargo) test $(2) -p $(1) --test '*' -- --include-ignored .PHONY: $(1)-test-watch From 8683a9441577a12248ccf1113eb07e7153583861 Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Fri, 28 Jun 2024 17:42:12 +0100 Subject: [PATCH 05/11] rename prcheck action --- .github/workflows/004-ubuntu-make-prcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/004-ubuntu-make-prcheck.yml b/.github/workflows/004-ubuntu-make-prcheck.yml index e615e63f5..0a5d43c18 100644 --- a/.github/workflows/004-ubuntu-make-prcheck.yml +++ b/.github/workflows/004-ubuntu-make-prcheck.yml @@ -24,7 +24,7 @@ # # - That the code does not warn (due to clippy errors/warnings) # -name: "(004) [ubuntu:latest] [prcheck]" +name: "PR check (004) [ubuntu:latest] [prcheck]" on: push: branches: main From 0eddd24e2597c85896ca5d692f2ec0b82a3c9e37 Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Mon, 8 Jul 2024 14:52:08 +0100 Subject: [PATCH 06/11] lint and test in github workflows --- .github/workflows/001-tester-ubuntu-make-test-auraed.yml | 8 ++------ .../workflows/002-tester-ubuntu-make-test-auraescript.yml | 8 ++------ .github/workflows/003-tester-ubuntu-make-test-aer.yml | 8 ++------ .github/workflows/004-ubuntu-make-prcheck.yml | 6 +++--- Makefile | 6 +++--- 5 files changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/workflows/001-tester-ubuntu-make-test-auraed.yml b/.github/workflows/001-tester-ubuntu-make-test-auraed.yml index 062bbc9b4..3fceb7460 100644 --- a/.github/workflows/001-tester-ubuntu-make-test-auraed.yml +++ b/.github/workflows/001-tester-ubuntu-make-test-auraed.yml @@ -91,9 +91,5 @@ jobs: run: | sudo apt-get update sudo apt-get install -y musl-tools - - name: Cargo build, lint, test [make test] - # This should remain the only command we execute as this matches the title of the file. - # The goal is for this to be easy to find from the GitHub dashboard. - # Instead of adding more commands here, consider another make target or a new YAML file - # named with a good name. - run: make auraed-test + - name: [auraed] lint and test + run: make auraed-lint auraed-test diff --git a/.github/workflows/002-tester-ubuntu-make-test-auraescript.yml b/.github/workflows/002-tester-ubuntu-make-test-auraescript.yml index e848c02b5..d435f40ad 100644 --- a/.github/workflows/002-tester-ubuntu-make-test-auraescript.yml +++ b/.github/workflows/002-tester-ubuntu-make-test-auraescript.yml @@ -86,9 +86,5 @@ jobs: run: | sudo apt-get update sudo apt-get install -y musl-tools - - name: Cargo build, lint, test [make test] - # This should remain the only command we execute as this matches the title of the file. - # The goal is for this to be easy to find from the GitHub dashboard. - # Instead of adding more commands here, consider another make target or a new YAML file - # named with a good name. - run: make auraescript-test + - name: [auraescript] lint and test + run: make auraescript-lint auraescript-test diff --git a/.github/workflows/003-tester-ubuntu-make-test-aer.yml b/.github/workflows/003-tester-ubuntu-make-test-aer.yml index 88a9d2d79..d0771b4b3 100644 --- a/.github/workflows/003-tester-ubuntu-make-test-aer.yml +++ b/.github/workflows/003-tester-ubuntu-make-test-aer.yml @@ -86,9 +86,5 @@ jobs: run: | sudo apt-get update sudo apt-get install -y musl-tools - - name: Cargo build, lint, test [make test] - # This should remain the only command we execute as this matches the title of the file. - # The goal is for this to be easy to find from the GitHub dashboard. - # Instead of adding more commands here, consider another make target or a new YAML file - # named with a good name. - run: make aer-test + - name: [aer] lint and test + run: make aer-lint aer-test diff --git a/.github/workflows/004-ubuntu-make-prcheck.yml b/.github/workflows/004-ubuntu-make-prcheck.yml index 0a5d43c18..0fb483226 100644 --- a/.github/workflows/004-ubuntu-make-prcheck.yml +++ b/.github/workflows/004-ubuntu-make-prcheck.yml @@ -24,7 +24,7 @@ # # - That the code does not warn (due to clippy errors/warnings) # -name: "PR check (004) [ubuntu:latest] [prcheck]" +name: "Test all (004) [ubuntu:latest] [test-all]" on: push: branches: main @@ -86,9 +86,9 @@ jobs: run: | sudo apt-get update sudo apt-get install -y musl-tools - - name: PR Check + - name: test-all # This should remain the only command we execute as this matches the title of the file. # The goal is for this to be easy to find from the GitHub dashboard. # Instead of adding more commands here, consider another make target or a new YAML file # named with a good name. - run: make prcheck + run: make test-all diff --git a/Makefile b/Makefile index e74986acc..7ac2b1158 100644 --- a/Makefile +++ b/Makefile @@ -40,9 +40,9 @@ clh_version = 30.0 vm_kernel = 6.1.6 vm_image = https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img ifeq ($(uid), 0) -root_cargo = cargo +root_cargo = $(cargo) else - root_cargo = sudo -E `which cargo` +root_cargo = sudo -E `which cargo` endif # Configuration Options @@ -229,7 +229,7 @@ $(1)-debug: musl $(GEN_RS) $(GEN_TS) $(1)-lint .PHONY: $(1)-release $(1)-release: musl $(GEN_RS) $(GEN_TS) $(1)-lint $(1)-test ## Lint, test, and install $(1) - $(cargo) install $(2) --path ./$(1) --force + $(cargo) install --path ./$(1) --force endef MUSL_TARGET=--target $(uname_m)-unknown-linux-musl From 25f06fa8017071bc22eb1de1bc14e8723484f9fe Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Mon, 8 Jul 2024 14:53:43 +0100 Subject: [PATCH 07/11] rename workflows to match commands --- ...est-auraed.yml => 001-tester-ubuntu-make-lint-test-auraed.yml} | 0 ...cript.yml => 002-tester-ubuntu-make-lint-test-auraescript.yml} | 0 ...make-test-aer.yml => 003-tester-ubuntu-make-lint-test-aer.yml} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{001-tester-ubuntu-make-test-auraed.yml => 001-tester-ubuntu-make-lint-test-auraed.yml} (100%) rename .github/workflows/{002-tester-ubuntu-make-test-auraescript.yml => 002-tester-ubuntu-make-lint-test-auraescript.yml} (100%) rename .github/workflows/{003-tester-ubuntu-make-test-aer.yml => 003-tester-ubuntu-make-lint-test-aer.yml} (100%) diff --git a/.github/workflows/001-tester-ubuntu-make-test-auraed.yml b/.github/workflows/001-tester-ubuntu-make-lint-test-auraed.yml similarity index 100% rename from .github/workflows/001-tester-ubuntu-make-test-auraed.yml rename to .github/workflows/001-tester-ubuntu-make-lint-test-auraed.yml diff --git a/.github/workflows/002-tester-ubuntu-make-test-auraescript.yml b/.github/workflows/002-tester-ubuntu-make-lint-test-auraescript.yml similarity index 100% rename from .github/workflows/002-tester-ubuntu-make-test-auraescript.yml rename to .github/workflows/002-tester-ubuntu-make-lint-test-auraescript.yml diff --git a/.github/workflows/003-tester-ubuntu-make-test-aer.yml b/.github/workflows/003-tester-ubuntu-make-lint-test-aer.yml similarity index 100% rename from .github/workflows/003-tester-ubuntu-make-test-aer.yml rename to .github/workflows/003-tester-ubuntu-make-lint-test-aer.yml From 025f2373948b85cde69c1c71aa4b24ae0da7c2eb Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Mon, 8 Jul 2024 15:01:56 +0100 Subject: [PATCH 08/11] fix names so they're parseable by github actions --- .github/workflows/001-tester-ubuntu-make-lint-test-auraed.yml | 2 +- .../workflows/002-tester-ubuntu-make-lint-test-auraescript.yml | 2 +- .github/workflows/003-tester-ubuntu-make-lint-test-aer.yml | 2 +- ...004-ubuntu-make-prcheck.yml => 004-ubuntu-make-test-all.yml} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{004-ubuntu-make-prcheck.yml => 004-ubuntu-make-test-all.yml} (98%) diff --git a/.github/workflows/001-tester-ubuntu-make-lint-test-auraed.yml b/.github/workflows/001-tester-ubuntu-make-lint-test-auraed.yml index 3fceb7460..b41934095 100644 --- a/.github/workflows/001-tester-ubuntu-make-lint-test-auraed.yml +++ b/.github/workflows/001-tester-ubuntu-make-lint-test-auraed.yml @@ -91,5 +91,5 @@ jobs: run: | sudo apt-get update sudo apt-get install -y musl-tools - - name: [auraed] lint and test + - name: Lint and test [auraed] run: make auraed-lint auraed-test diff --git a/.github/workflows/002-tester-ubuntu-make-lint-test-auraescript.yml b/.github/workflows/002-tester-ubuntu-make-lint-test-auraescript.yml index d435f40ad..17197765f 100644 --- a/.github/workflows/002-tester-ubuntu-make-lint-test-auraescript.yml +++ b/.github/workflows/002-tester-ubuntu-make-lint-test-auraescript.yml @@ -86,5 +86,5 @@ jobs: run: | sudo apt-get update sudo apt-get install -y musl-tools - - name: [auraescript] lint and test + - name: Lint and test [auraescript] run: make auraescript-lint auraescript-test diff --git a/.github/workflows/003-tester-ubuntu-make-lint-test-aer.yml b/.github/workflows/003-tester-ubuntu-make-lint-test-aer.yml index d0771b4b3..ad8c7a043 100644 --- a/.github/workflows/003-tester-ubuntu-make-lint-test-aer.yml +++ b/.github/workflows/003-tester-ubuntu-make-lint-test-aer.yml @@ -86,5 +86,5 @@ jobs: run: | sudo apt-get update sudo apt-get install -y musl-tools - - name: [aer] lint and test + - name: Lint and test [aer] run: make aer-lint aer-test diff --git a/.github/workflows/004-ubuntu-make-prcheck.yml b/.github/workflows/004-ubuntu-make-test-all.yml similarity index 98% rename from .github/workflows/004-ubuntu-make-prcheck.yml rename to .github/workflows/004-ubuntu-make-test-all.yml index 0fb483226..d9e508183 100644 --- a/.github/workflows/004-ubuntu-make-prcheck.yml +++ b/.github/workflows/004-ubuntu-make-test-all.yml @@ -18,7 +18,7 @@ # # # ---------------------------------------------------------------------------- # # -# This is the main PR check for aurae +# This is the "test all the things" workflow for aurae # # This build check will introduce confidence for the following: # From b8281f1fe7b90c0333e4e44392acbccb66cfad74 Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Mon, 8 Jul 2024 15:36:14 +0100 Subject: [PATCH 09/11] pin oci-spec and use a tag for libcontainer --- Cargo.lock | 44 ++++++++++++++++++++++---------------------- auraed/Cargo.toml | 6 +++--- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 50ffd4da1..6347cb27f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1115,9 +1115,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ "darling_core", "darling_macro", @@ -1125,27 +1125,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.63", + "syn 1.0.109", ] [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core", "quote", - "syn 2.0.63", + "syn 1.0.109", ] [[package]] @@ -1968,33 +1968,33 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.63", + "syn 1.0.109", ] [[package]] name = "derive_builder_macro" -version = "0.20.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" dependencies = [ "derive_builder_core", - "syn 2.0.63", + "syn 1.0.109", ] [[package]] @@ -3410,8 +3410,8 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libcgroups" -version = "0.0.5" -source = "git+https://github.com/containers/youki?rev=f4e7e300e6be7a4ea758a436218b9db1b39c69cd#f4e7e300e6be7a4ea758a436218b9db1b39c69cd" +version = "0.1.0" +source = "git+https://github.com/containers/youki?tag=v0.1.0#4dc30bf7c02be584eddfc182d4e96b7cbbb3474c" dependencies = [ "fixedbitset", "nix 0.26.2", @@ -3424,8 +3424,8 @@ dependencies = [ [[package]] name = "libcontainer" -version = "0.0.5" -source = "git+https://github.com/containers/youki?rev=f4e7e300e6be7a4ea758a436218b9db1b39c69cd#f4e7e300e6be7a4ea758a436218b9db1b39c69cd" +version = "0.1.0" +source = "git+https://github.com/containers/youki?tag=v0.1.0#4dc30bf7c02be584eddfc182d4e96b7cbbb3474c" dependencies = [ "bitflags 2.5.0", "caps", @@ -4070,9 +4070,9 @@ dependencies = [ [[package]] name = "oci-spec" -version = "0.6.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e423c4f827362c0d8d8da4b1f571270f389ebde73bcd3240a3d23c6d6f61d0f0" +checksum = "cf77d2eace1f4909b081d231d1ad3570ba3448ae95290ab701314faaee1b611a" dependencies = [ "derive_builder", "getset", diff --git a/auraed/Cargo.toml b/auraed/Cargo.toml index 60f826484..a210a32f0 100644 --- a/auraed/Cargo.toml +++ b/auraed/Cargo.toml @@ -55,16 +55,16 @@ ipnetwork = "0.20.0" iter_tools = "0.1.4" libc = "0.2.155" # TODO: Nix comes with libc, can we rely on that? lazy_static = { workspace = true } -libcgroups = { git = "https://github.com/containers/youki", rev = "f4e7e300e6be7a4ea758a436218b9db1b39c69cd", default-features = false, features = [ +libcgroups = { git = "https://github.com/containers/youki", tag = "v0.1.0", default-features = false, features = [ "v2", ] } -libcontainer = { git = "https://github.com/containers/youki", rev = "f4e7e300e6be7a4ea758a436218b9db1b39c69cd", default-features = false, features = [ +libcontainer = { git = "https://github.com/containers/youki", tag = "v0.1.0", default-features = false, features = [ "v2", ] } log = "0.4.17" netlink-packet-route = "0.13.0" # Used for netlink_packet_route::rtnl::address::nlas definition nix = { workspace = true, features = ["sched"] } -oci-spec = "0.6.1" +oci-spec = "= 0.6.1" once_cell = "1" procfs = "0.14.2" proto = { workspace = true } From eca60828dcf01f7e6da30d38367412aefa33e880 Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Mon, 8 Jul 2024 15:56:09 +0100 Subject: [PATCH 10/11] make test-all not required --- .github/workflows/004-ubuntu-make-test-all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/004-ubuntu-make-test-all.yml b/.github/workflows/004-ubuntu-make-test-all.yml index d9e508183..dcb8e3e7d 100644 --- a/.github/workflows/004-ubuntu-make-test-all.yml +++ b/.github/workflows/004-ubuntu-make-test-all.yml @@ -33,7 +33,7 @@ on: env: CARGO_TERM_COLOR: always jobs: - build: + test-all: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 129e4345f97c56271d469a74787213fd7bf541e9 Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Tue, 16 Jul 2024 11:56:10 +0100 Subject: [PATCH 11/11] add PKI as dependency for prcheck rule --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7ac2b1158..367090f51 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ install: musl test auraed-debug auraescript-debug aer-debug ## Lint, test, and i docs: docs-crates docs-stdlib docs-other ## Assemble all the /docs for the website locally. .PHONY: prcheck -prcheck: build lint test-all docs docs-lint ## Meant to mimic the GHA checks (includes ignored tests) +prcheck: pki build lint test-all docs docs-lint ## Meant to mimic the GHA checks (includes ignored tests) #------------------------------------------------------------------------------#