From 51149c763d53834ef258863f0f0526211d3e0875 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Mon, 12 Feb 2024 17:29:30 +0100 Subject: [PATCH] chore: Ensure in the CI pipeline that all the examples can be built --- .github/workflows/CI.yml | 2 ++ artifact-post-action/compute-risk/Makefile | 13 +++++++++++++ artifact-post-action/compute-risk/shell.nix | 3 ++- .../post-action-add-comment/Makefile | 13 +++++++++++++ .../post-action-add-comment/shell.nix | 3 ++- 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 artifact-post-action/compute-risk/Makefile create mode 100644 artifact-post-action/post-action-add-comment/Makefile diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5ee2cb6..6017157 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,6 +14,8 @@ jobs: matrix: tuleap_functions: - "artifact-post-action/auto-assign" + - "artifact-post-action/compute-risk" + - "artifact-post-action/post-action-add-comment" runs-on: ubuntu-22.04 name: Tests (${{ matrix.tuleap_functions }}) defaults: diff --git a/artifact-post-action/compute-risk/Makefile b/artifact-post-action/compute-risk/Makefile new file mode 100644 index 0000000..b5a39c2 --- /dev/null +++ b/artifact-post-action/compute-risk/Makefile @@ -0,0 +1,13 @@ +SHELL=/usr/bin/env bash -euo pipefail -c + +.PHONY: prepare +prepare: + true + +.PHONY: tests +tests: + true + +.PHONY: build +build: + cargo build --target wasm32-wasi --release diff --git a/artifact-post-action/compute-risk/shell.nix b/artifact-post-action/compute-risk/shell.nix index a7d49fd..30005f9 100644 --- a/artifact-post-action/compute-risk/shell.nix +++ b/artifact-post-action/compute-risk/shell.nix @@ -1,10 +1,11 @@ { pkgs ? (import ../tools/pinned-nixpkgs.nix) {} }: -pkgs.mkShell { +pkgs.mkShellNoCC { buildInputs = [ (pkgs.rust-bin.stable.latest.default.override { targets = [ "wasm32-wasi" ]; extensions = [ "cargo" "rustc" "rust-src" ]; }) + pkgs.gnumake ]; } diff --git a/artifact-post-action/post-action-add-comment/Makefile b/artifact-post-action/post-action-add-comment/Makefile new file mode 100644 index 0000000..e46900e --- /dev/null +++ b/artifact-post-action/post-action-add-comment/Makefile @@ -0,0 +1,13 @@ +SHELL=/usr/bin/env bash -euo pipefail -c + +.PHONY: prepare +prepare: + true + +.PHONY: tests +tests: + cargo test + +.PHONY: build +build: + cargo build --target wasm32-wasi --release diff --git a/artifact-post-action/post-action-add-comment/shell.nix b/artifact-post-action/post-action-add-comment/shell.nix index a7d49fd..30005f9 100644 --- a/artifact-post-action/post-action-add-comment/shell.nix +++ b/artifact-post-action/post-action-add-comment/shell.nix @@ -1,10 +1,11 @@ { pkgs ? (import ../tools/pinned-nixpkgs.nix) {} }: -pkgs.mkShell { +pkgs.mkShellNoCC { buildInputs = [ (pkgs.rust-bin.stable.latest.default.override { targets = [ "wasm32-wasi" ]; extensions = [ "cargo" "rustc" "rust-src" ]; }) + pkgs.gnumake ]; }