Skip to content

Commit 83d02bd

Browse files
committed
Always use the the same nix shell for buildconfig verification
We may as well just initialize the most capable shell needed and use that for everything. Once it's initialized once, starting it up again is fast. Change-Id: I0c3ae004309b82d057f50ab066a4930c43b0be99
1 parent 55e0a58 commit 83d02bd

19 files changed

+27
-46
lines changed

buildconfigs/key_xor_test_app.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=key_xor_test_app
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#bazelRustShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
build_key_xor_test_app

buildconfigs/oak_client_android_app.sh

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export PACKAGE_NAME=oak_client_android_app
77
export BUILD_COMMAND=(
88
nix
99
develop
10+
.#githubBuildShell
1011
--command
1112
just
1213
oak_client_android_app

buildconfigs/oak_containers_agent.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_containers_agent
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#systemImageShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
oak_containers_agent

buildconfigs/oak_containers_kernel.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_containers_kernel
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#linuxKernelShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
oak_containers_kernel

buildconfigs/oak_containers_nvidia_system_image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_containers_nvidia_system_image
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#systemImageShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
oak_containers_nvidia_system_image

buildconfigs/oak_containers_orchestrator.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_containers_orchestrator
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#systemImageShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
oak_containers_orchestrator

buildconfigs/oak_containers_stage1.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_containers_stage1
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#stage1Shell
10+
.#githubBuildShell
1111
--command
1212
just
1313
stage1_cpio

buildconfigs/oak_containers_syslogd.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_containers_syslogd
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#systemImageShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
oak_containers_syslogd

buildconfigs/oak_containers_system_image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_containers_system_image
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#systemImageShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
oak_containers_system_image

buildconfigs/oak_echo_enclave_app.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_echo_enclave_app
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#bazelRustShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
build_enclave_app

buildconfigs/oak_echo_raw_enclave_app.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_echo_raw_enclave_app
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#bazelRustShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
build_enclave_app

buildconfigs/oak_functions_enclave_app.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_functions_enclave_app
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#bazelRustShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
build_enclave_app

buildconfigs/oak_functions_insecure_enclave_app.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_functions_insecure_enclave_app
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#bazelRustShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
build_oak_functions_insecure_enclave_app

buildconfigs/oak_orchestrator.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PACKAGE_NAME=oak_orchestrator
77
export BUILD_COMMAND=(
88
nix
99
develop
10-
.#bazelRustShell
10+
.#githubBuildShell
1111
--command
1212
just
1313
build_enclave_app

buildconfigs/oak_restricted_kernel_simple_io_init_rd_wrapper_bin.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export PACKAGE_NAME=oak_restricted_kernel_simple_io_init_rd_wrapper_bin
1010
export BUILD_COMMAND=(
1111
nix
1212
develop
13-
.#ci
13+
.#githubBuildShell
1414
--command
1515
just
1616
oak_restricted_kernel_wrapper_simple_io_channel

buildconfigs/stage0_bin.sh

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export PACKAGE_NAME=stage0_bin
77
export BUILD_COMMAND=(
88
nix
99
develop
10+
.#githubBuildShell
1011
--command
1112
just
1213
stage0_bin

buildconfigs/stage0_bin_tdx.sh

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export PACKAGE_NAME=stage0_bin_tdx
77
export BUILD_COMMAND=(
88
nix
99
develop
10+
.#githubBuildShell
1011
--command
1112
just
1213
stage0_bin_tdx

flake.nix

+9-30
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,6 @@
177177
bazel-buildtools
178178
];
179179
};
180-
# Generic shell to build Rust binaries with bazel.
181-
bazelRustShell = with pkgs; mkShell {
182-
inputsFrom = [
183-
rust
184-
bazelShell
185-
];
186-
};
187180
# Shell for building Oak Containers kernel and system image. This is not included in the
188181
# default shell because it is not needed as part of the CI.
189182
containers = with pkgs; mkShell {
@@ -242,29 +235,6 @@
242235
libelf
243236
];
244237
};
245-
# Shell for oak_containers_stage1.
246-
stage1Shell = with pkgs; mkShell {
247-
inputsFrom = [
248-
rust
249-
bazelShell
250-
];
251-
packages = [
252-
cpio
253-
glibc
254-
glibc.static
255-
strip-nondeterminism
256-
];
257-
};
258-
# Shell for Oak Containers system images.
259-
systemImageShell = with pkgs; mkShell {
260-
inputsFrom = [
261-
rust
262-
bazelShell
263-
];
264-
packages = [
265-
elfutils
266-
];
267-
};
268238
# Shell for most CI steps (i.e. without containers support).
269239
ci = pkgs.mkShell {
270240
shellHook = ''
@@ -280,6 +250,15 @@
280250
lint
281251
];
282252
};
253+
# This is the shell used by the build scripts executed by GitHub jobs.
254+
githubBuildShell = pkgs.mkShell {
255+
packages = [ ];
256+
inputsFrom = [
257+
containers
258+
rust
259+
bazelShell
260+
];
261+
};
283262
# By default create a shell with all the inputs.
284263
default = pkgs.mkShell {
285264
packages = [ ];

kokoro/verify_buildconfigs.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ cd "$(dirname "$0")/.."
1313
source kokoro/helpers/common.sh
1414

1515
./scripts/docker_pull
16-
./scripts/docker_run nix develop .#ci --command just kokoro_verify_buildconfigs
17-
./scripts/git_check_diff
16+
./scripts/docker_run nix develop .#githubBuildShell --command just kokoro_verify_buildconfigs
1817

1918
kokoro_cleanup

0 commit comments

Comments
 (0)