From 722674e88cd8ed0e636dc710467741f82e06ab94 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 14:35:03 -0500 Subject: [PATCH 01/29] Set up CI to run buck2 samples --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec2bac2d..109d4a74 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -102,3 +102,29 @@ jobs: OS: linux REMOTE_EXECUTION: ${{ matrix.remote_execution }} run: python3 infra/test-all.py + + buck2-test-matrix: + runs-on: + - self-hosted + - "os=linux" + - "arch=x64" + - "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian11-dind-x64@sha256:604855f1ecd6edad3f45f513ed0112b9e8e32589871133767a1a51944b07f487" + - "engflow-pool=ci_sysbox_x64" + - "engflow-runtime=sysbox-runc" + - "engflow-runner-id=${{ github.repository_id }}_ci-runners-test-matrix_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}" + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v4 + + - name: Set up Buck2 binary + shell: bash + run: infra/setup-buck2.sh + + - name: Set up authentication + shell: bash + run: infra/auth-buck2.sh + + - name: Build and test + shell: bash + run: infra/test-buck2.sh From d99837ba68d4848d7f907d007363021814da4007 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 14:36:32 -0500 Subject: [PATCH 02/29] Set up CI to run buck2 samples --- infra/auth-buck2.sh | 11 +++++++++++ infra/setup-buck2.sh | 20 ++++++++++++++++++++ infra/test-buck2.sh | 19 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 infra/auth-buck2.sh create mode 100644 infra/setup-buck2.sh create mode 100644 infra/test-buck2.sh diff --git a/infra/auth-buck2.sh b/infra/auth-buck2.sh new file mode 100644 index 00000000..f39446c6 --- /dev/null +++ b/infra/auth-buck2.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Modify the buck2/**/.buckconfig files to set the test cluster to opal. +find . -type f -name .buckconfig -exec sed -i 's//opal/' {} \; + +# Modify the buck2/**/.buckconfig files to set the "Authorization=Bearer $GITHUB_TOKEN" in the http_headers. +find . -type f -name .buckconfig sed -i 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/' {} \; +sed 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/' ./buck2/python/.buckconfig + +# Testing only - remove before merging +cat buck2/cpp/.buckconfig \ No newline at end of file diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh new file mode 100644 index 00000000..df00d731 --- /dev/null +++ b/infra/setup-buck2.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Build zstd: Remove once zstd is insalled in CI runner. +git clone https://github.com/facebook/zstd.git +cd zstd/build/cmake +cmake . +make +cd ../../../ + +# Get the Buck2 binary. +wget https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-unknown-linux-gnu.zst + +# Unpack the binary. +# Use installed zstd once available in the CI runner. +zstd/build/cmake//programs/zstd -d buck2-aarch64-unknown-linux-gnu.zst +# unzstd buck2-aarch64-unknown-linux-gnu.zst + +# Change its name and make it executable. +mv buck2-aarch64-unknown-linux-gnu.zst buck2 +chmod +x buck2 diff --git a/infra/test-buck2.sh b/infra/test-buck2.sh new file mode 100644 index 00000000..6f10924e --- /dev/null +++ b/infra/test-buck2.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Run cpp example +cd buck2/cpp +../../buck2 build //:cpp_lib +../../buck2 test //:cpp_test +cd .. + +# Run python example +cd python +../../buck2 build //main:check_main +../../buck2 test //hello:hello_unittest_test +cd .. + +# Run go example +cd go +../../buck2 build //go:hello +../../buck2 test //go/greeting:greeting_test +cd .. From ffd2b876e4dd0dadce30f7ad894b06ded3ee0e2e Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 14:40:11 -0500 Subject: [PATCH 03/29] setting permissions --- infra/auth-buck2.sh | 2 +- infra/setup-buck2.sh | 0 infra/test-buck2.sh | 0 3 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 infra/auth-buck2.sh mode change 100644 => 100755 infra/setup-buck2.sh mode change 100644 => 100755 infra/test-buck2.sh diff --git a/infra/auth-buck2.sh b/infra/auth-buck2.sh old mode 100644 new mode 100755 index f39446c6..5d9b1710 --- a/infra/auth-buck2.sh +++ b/infra/auth-buck2.sh @@ -8,4 +8,4 @@ find . -type f -name .buckconfig sed -i 's/x-engflow-auth-method:jwt-v0,x-engflo sed 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/' ./buck2/python/.buckconfig # Testing only - remove before merging -cat buck2/cpp/.buckconfig \ No newline at end of file +cat buck2/cpp/.buckconfig diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh old mode 100644 new mode 100755 diff --git a/infra/test-buck2.sh b/infra/test-buck2.sh old mode 100644 new mode 100755 From d77d44fb79fff19639f9a9b00749715f48c59d32 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 14:52:21 -0500 Subject: [PATCH 04/29] fix find command --- infra/auth-buck2.sh | 5 ++--- infra/setup-buck2.sh | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/infra/auth-buck2.sh b/infra/auth-buck2.sh index 5d9b1710..af0c78c0 100755 --- a/infra/auth-buck2.sh +++ b/infra/auth-buck2.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash # Modify the buck2/**/.buckconfig files to set the test cluster to opal. -find . -type f -name .buckconfig -exec sed -i 's//opal/' {} \; +find . -type f -name ".buckconfig" -exec sed -i 's//opal/' {} \; # Modify the buck2/**/.buckconfig files to set the "Authorization=Bearer $GITHUB_TOKEN" in the http_headers. -find . -type f -name .buckconfig sed -i 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/' {} \; -sed 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/' ./buck2/python/.buckconfig +find . -type f -name ".buckconfig" sed -i 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/' {} \; # Testing only - remove before merging cat buck2/cpp/.buckconfig diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index df00d731..398c9eda 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -12,7 +12,7 @@ wget https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-un # Unpack the binary. # Use installed zstd once available in the CI runner. -zstd/build/cmake//programs/zstd -d buck2-aarch64-unknown-linux-gnu.zst +zstd/build/cmake/programs/zstd -d buck2-aarch64-unknown-linux-gnu.zst # unzstd buck2-aarch64-unknown-linux-gnu.zst # Change its name and make it executable. From 1043d3355d1aef6f07e217ac1b61eee9e7f1f64f Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 14:57:09 -0500 Subject: [PATCH 05/29] fix find command --- infra/auth-buck2.sh | 4 ++-- infra/test-buck2.sh | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/infra/auth-buck2.sh b/infra/auth-buck2.sh index af0c78c0..b4f321f6 100755 --- a/infra/auth-buck2.sh +++ b/infra/auth-buck2.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash # Modify the buck2/**/.buckconfig files to set the test cluster to opal. -find . -type f -name ".buckconfig" -exec sed -i 's//opal/' {} \; +find ./ -type f -name '.buckconfig' -exec sed -i 's//opal/g' {} \; # Modify the buck2/**/.buckconfig files to set the "Authorization=Bearer $GITHUB_TOKEN" in the http_headers. -find . -type f -name ".buckconfig" sed -i 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/' {} \; +find ./ -type f -name '.buckconfig' -exec sed -i 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/g' {} \; # Testing only - remove before merging cat buck2/cpp/.buckconfig diff --git a/infra/test-buck2.sh b/infra/test-buck2.sh index 6f10924e..8eea1d37 100755 --- a/infra/test-buck2.sh +++ b/infra/test-buck2.sh @@ -2,18 +2,19 @@ # Run cpp example cd buck2/cpp -../../buck2 build //:cpp_lib -../../buck2 test //:cpp_test +../../buck2-exe build //:cpp_lib +../../buck2-exe test //:cpp_test cd .. # Run python example cd python -../../buck2 build //main:check_main -../../buck2 test //hello:hello_unittest_test +../../buck2-exe build //main:check_main +../../buck2-exe test //hello:hello_unittest_test cd .. # Run go example +pwd cd go -../../buck2 build //go:hello -../../buck2 test //go/greeting:greeting_test +../../buck2-exe build //go:hello +../../buck2-exe test //go/greeting:greeting_test cd .. From b241a7b61d3307029e1ef84d4b341ce08d89e849 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 15:01:41 -0500 Subject: [PATCH 06/29] verbose shell --- infra/auth-buck2.sh | 3 +-- infra/setup-buck2.sh | 1 + infra/test-buck2.sh | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/infra/auth-buck2.sh b/infra/auth-buck2.sh index b4f321f6..9bf7d62a 100755 --- a/infra/auth-buck2.sh +++ b/infra/auth-buck2.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -x # Modify the buck2/**/.buckconfig files to set the test cluster to opal. find ./ -type f -name '.buckconfig' -exec sed -i 's//opal/g' {} \; @@ -6,5 +7,3 @@ find ./ -type f -name '.buckconfig' -exec sed -i 's//opal/g' {} \; # Modify the buck2/**/.buckconfig files to set the "Authorization=Bearer $GITHUB_TOKEN" in the http_headers. find ./ -type f -name '.buckconfig' -exec sed -i 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/g' {} \; -# Testing only - remove before merging -cat buck2/cpp/.buckconfig diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index 398c9eda..092a5191 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -x # Build zstd: Remove once zstd is insalled in CI runner. git clone https://github.com/facebook/zstd.git diff --git a/infra/test-buck2.sh b/infra/test-buck2.sh index 8eea1d37..2199974c 100755 --- a/infra/test-buck2.sh +++ b/infra/test-buck2.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -x # Run cpp example cd buck2/cpp @@ -13,7 +14,7 @@ cd python cd .. # Run go example -pwd +echo pwd cd go ../../buck2-exe build //go:hello ../../buck2-exe test //go/greeting:greeting_test From 21db2a389d7fb5f9c929ab6e419d121c686c039e Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 15:14:22 -0500 Subject: [PATCH 07/29] fix runner id --- .github/workflows/main.yml | 4 ++-- infra/setup-buck2.sh | 4 ++-- infra/test-buck2.sh | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 109d4a74..e26b86ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -103,7 +103,7 @@ jobs: REMOTE_EXECUTION: ${{ matrix.remote_execution }} run: python3 infra/test-all.py - buck2-test-matrix: + buck2-test: runs-on: - self-hosted - "os=linux" @@ -111,7 +111,7 @@ jobs: - "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian11-dind-x64@sha256:604855f1ecd6edad3f45f513ed0112b9e8e32589871133767a1a51944b07f487" - "engflow-pool=ci_sysbox_x64" - "engflow-runtime=sysbox-runc" - - "engflow-runner-id=${{ github.repository_id }}_ci-runners-test-matrix_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}" + - "engflow-runner-id=${{ github.repository_id }}_buck2-test_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}" timeout-minutes: 10 steps: diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index 092a5191..29ed3b75 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -17,5 +17,5 @@ zstd/build/cmake/programs/zstd -d buck2-aarch64-unknown-linux-gnu.zst # unzstd buck2-aarch64-unknown-linux-gnu.zst # Change its name and make it executable. -mv buck2-aarch64-unknown-linux-gnu.zst buck2 -chmod +x buck2 +mv buck2-aarch64-unknown-linux-gnu.zst buck2-exe +chmod +x buck2-exe diff --git a/infra/test-buck2.sh b/infra/test-buck2.sh index 2199974c..b94916fe 100755 --- a/infra/test-buck2.sh +++ b/infra/test-buck2.sh @@ -14,8 +14,7 @@ cd python cd .. # Run go example -echo pwd -cd go +cd golang ../../buck2-exe build //go:hello ../../buck2-exe test //go/greeting:greeting_test cd .. From 494f4580e0292418b2515c85f036e31f48bcfea5 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 15:35:56 -0500 Subject: [PATCH 08/29] fixing building zstd --- infra/setup-buck2.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index 29ed3b75..c944c55e 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -3,17 +3,16 @@ set -x # Build zstd: Remove once zstd is insalled in CI runner. git clone https://github.com/facebook/zstd.git -cd zstd/build/cmake -cmake . +cd zstd/ make -cd ../../../ +cd ../ # Get the Buck2 binary. -wget https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-unknown-linux-gnu.zst +curl --output buck2-aarch64-unknown-linux-gnu.zst https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-unknown-linux-gnu.zst # Unpack the binary. # Use installed zstd once available in the CI runner. -zstd/build/cmake/programs/zstd -d buck2-aarch64-unknown-linux-gnu.zst +./zstd/zstd -d buck2-aarch64-unknown-linux-gnu.zst # unzstd buck2-aarch64-unknown-linux-gnu.zst # Change its name and make it executable. From 252a68de76421cd226aaef729d6e714a97248790 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 15:47:34 -0500 Subject: [PATCH 09/29] fix downloading buck2 binary --- infra/setup-buck2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index c944c55e..f990bd09 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -8,7 +8,7 @@ make cd ../ # Get the Buck2 binary. -curl --output buck2-aarch64-unknown-linux-gnu.zst https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-unknown-linux-gnu.zst +curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-unknown-linux-gnu.zst # Unpack the binary. # Use installed zstd once available in the CI runner. From 4d5034149abc67df7b65f2f0f633fb7bb54264a9 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 15:55:36 -0500 Subject: [PATCH 10/29] fix buck2 version --- infra/setup-buck2.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index f990bd09..31227857 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -8,13 +8,15 @@ make cd ../ # Get the Buck2 binary. -curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-unknown-linux-gnu.zst +curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst + + # Unpack the binary. # Use installed zstd once available in the CI runner. -./zstd/zstd -d buck2-aarch64-unknown-linux-gnu.zst -# unzstd buck2-aarch64-unknown-linux-gnu.zst +./zstd/zstd -d buck2-x86_64-unknown-linux-gnu.zst +# unzstd buck2-x86_64-unknown-linux-gnu.zst # Change its name and make it executable. -mv buck2-aarch64-unknown-linux-gnu.zst buck2-exe +mv buck2-x86_64-unknown-linux-gnu.zst buck2-exe chmod +x buck2-exe From c7ff911e37ebdfc119cf8635902b6699ba2c990e Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 17:09:34 -0500 Subject: [PATCH 11/29] nit --- infra/setup-buck2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index 31227857..806a2432 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -5,7 +5,7 @@ set -x git clone https://github.com/facebook/zstd.git cd zstd/ make -cd ../ +cd .. # Get the Buck2 binary. curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst From 99ed06f0186f7c70f2a638f2cfc67b0416bcb1c5 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 17:14:16 -0500 Subject: [PATCH 12/29] use debian 12 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e26b86ce..aa9fc484 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -108,7 +108,7 @@ jobs: - self-hosted - "os=linux" - "arch=x64" - - "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian11-dind-x64@sha256:604855f1ecd6edad3f45f513ed0112b9e8e32589871133767a1a51944b07f487" + - "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian12-dind-x64@sha256:763903935682de148b4e09fe1d7ef3bbc4ec829d59c3f41cb9519984639eaa06" - "engflow-pool=ci_sysbox_x64" - "engflow-runtime=sysbox-runc" - "engflow-runner-id=${{ github.repository_id }}_buck2-test_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}" From b70cd31b0bdbe877e186bac39e05c81e2703b010 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 17:19:40 -0500 Subject: [PATCH 13/29] fix --- .github/workflows/main.yml | 2 +- infra/setup-buck2.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa9fc484..e26b86ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -108,7 +108,7 @@ jobs: - self-hosted - "os=linux" - "arch=x64" - - "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian12-dind-x64@sha256:763903935682de148b4e09fe1d7ef3bbc4ec829d59c3f41cb9519984639eaa06" + - "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian11-dind-x64@sha256:604855f1ecd6edad3f45f513ed0112b9e8e32589871133767a1a51944b07f487" - "engflow-pool=ci_sysbox_x64" - "engflow-runtime=sysbox-runc" - "engflow-runner-id=${{ github.repository_id }}_buck2-test_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}" diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index 806a2432..dd024d98 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -18,5 +18,5 @@ curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-x86_ # unzstd buck2-x86_64-unknown-linux-gnu.zst # Change its name and make it executable. -mv buck2-x86_64-unknown-linux-gnu.zst buck2-exe +mv buck2-x86_64-unknown-linux-gnu buck2-exe chmod +x buck2-exe From 2860a92577bc1d72f8d610b41c323ad39b76d1ab Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 17:25:55 -0500 Subject: [PATCH 14/29] use statically linked buck2 binary --- infra/setup-buck2.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index dd024d98..e70aac43 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -8,15 +8,15 @@ make cd .. # Get the Buck2 binary. -curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst +curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-musl.zst # Unpack the binary. # Use installed zstd once available in the CI runner. -./zstd/zstd -d buck2-x86_64-unknown-linux-gnu.zst -# unzstd buck2-x86_64-unknown-linux-gnu.zst +./zstd/zstd -d buck2-x86_64-unknown-linux-musl.zst +# unzstd buck2-x86_64-unknown-linux-musl.zst # Change its name and make it executable. -mv buck2-x86_64-unknown-linux-gnu buck2-exe +mv buck2-x86_64-unknown-linux-musl buck2-exe chmod +x buck2-exe From 1cce4856c342ef241a6a9ea661c4742c02c633da Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Fri, 22 Nov 2024 17:33:41 -0500 Subject: [PATCH 15/29] fix auth header --- infra/auth-buck2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/auth-buck2.sh b/infra/auth-buck2.sh index 9bf7d62a..663a80ea 100755 --- a/infra/auth-buck2.sh +++ b/infra/auth-buck2.sh @@ -5,5 +5,5 @@ set -x find ./ -type f -name '.buckconfig' -exec sed -i 's//opal/g' {} \; # Modify the buck2/**/.buckconfig files to set the "Authorization=Bearer $GITHUB_TOKEN" in the http_headers. -find ./ -type f -name '.buckconfig' -exec sed -i 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization=Bearer $GITHUB_TOKEN/g' {} \; +find ./ -type f -name '.buckconfig' -exec sed -i 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization:Bearer $GITHUB_TOKEN/g' {} \; From 6169024a2bb6cacde5e71a43fe063f2a81c5a7c4 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Mon, 25 Nov 2024 11:27:16 -0500 Subject: [PATCH 16/29] add env for github token --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e26b86ce..e44ebc70 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -126,5 +126,7 @@ jobs: run: infra/auth-buck2.sh - name: Build and test + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash run: infra/test-buck2.sh From c3df3f90aca692ecc41ca395bbcce2ed5378df32 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Mon, 25 Nov 2024 18:53:56 -0500 Subject: [PATCH 17/29] remove unnecessary env --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e44ebc70..e26b86ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -126,7 +126,5 @@ jobs: run: infra/auth-buck2.sh - name: Build and test - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash run: infra/test-buck2.sh From 870dce1834da23a1a22cd24d0e8438e39a210d89 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 27 Nov 2024 11:30:33 -0500 Subject: [PATCH 18/29] test using github auth for EF CI --- .github/workflows/main.yml | 2 +- infra/test-github-auth.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 infra/test-github-auth.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e26b86ce..6573a1b8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,7 +53,7 @@ jobs: - name: Set up authentication shell: bash - run: cp infra/bazelrc .bazelrc.user + run: test-github-auth.sh - name: Generate python requirements lock shell: bash diff --git a/infra/test-github-auth.sh b/infra/test-github-auth.sh new file mode 100644 index 00000000..5009b6c9 --- /dev/null +++ b/infra/test-github-auth.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -x + +touch .bazelrc.user +echo 'Authorization=Bearer $GITHUB_TOKEN' >> .bazelrc.user From b05fc96f356eaea1709a3b343a1c1e2cf25ab960 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 27 Nov 2024 11:32:05 -0500 Subject: [PATCH 19/29] test using github auth for EF CI --- .github/workflows/main.yml | 2 +- infra/test-github-auth.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 infra/test-github-auth.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6573a1b8..5e3c21af 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,7 +53,7 @@ jobs: - name: Set up authentication shell: bash - run: test-github-auth.sh + run: infra/test-github-auth.sh - name: Generate python requirements lock shell: bash diff --git a/infra/test-github-auth.sh b/infra/test-github-auth.sh old mode 100644 new mode 100755 From 9ec249e7c53c29747a28fcf2f91286dc6e668359 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 27 Nov 2024 11:36:58 -0500 Subject: [PATCH 20/29] test using github auth for EF CI --- infra/test-github-auth.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infra/test-github-auth.sh b/infra/test-github-auth.sh index 5009b6c9..bb3ad977 100755 --- a/infra/test-github-auth.sh +++ b/infra/test-github-auth.sh @@ -2,4 +2,5 @@ set -x touch .bazelrc.user -echo 'Authorization=Bearer $GITHUB_TOKEN' >> .bazelrc.user +echo 'build:opal_auth -- remote_header=\"Authorization=Bearer $GITHUB_TOKEN\"' >> .bazelrc.user +cat .bazelrc.user From 97253f522d644e1699d77df375520bbe9fa0b8b3 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 27 Nov 2024 11:37:14 -0500 Subject: [PATCH 21/29] test using github auth for EF CI --- infra/test-github-auth.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/test-github-auth.sh b/infra/test-github-auth.sh index bb3ad977..f4bb8668 100755 --- a/infra/test-github-auth.sh +++ b/infra/test-github-auth.sh @@ -2,5 +2,5 @@ set -x touch .bazelrc.user -echo 'build:opal_auth -- remote_header=\"Authorization=Bearer $GITHUB_TOKEN\"' >> .bazelrc.user +echo 'build:opal_auth --remote_header=\"Authorization=Bearer $GITHUB_TOKEN\"' >> .bazelrc.user cat .bazelrc.user From e8bf5160309e1bc68592c41b8c80dc58b8c4d1e6 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 27 Nov 2024 11:59:51 -0500 Subject: [PATCH 22/29] test acces to container --- .github/workflows/main.yml | 2 ++ infra/test-github-auth.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e3c21af..94223847 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,6 +56,8 @@ jobs: run: infra/test-github-auth.sh - name: Generate python requirements lock + env: + GITHUB_ACTOR: ${{ github.actor }} shell: bash run: bazel run //python:requirements.update diff --git a/infra/test-github-auth.sh b/infra/test-github-auth.sh index f4bb8668..c6def5eb 100755 --- a/infra/test-github-auth.sh +++ b/infra/test-github-auth.sh @@ -4,3 +4,7 @@ set -x touch .bazelrc.user echo 'build:opal_auth --remote_header=\"Authorization=Bearer $GITHUB_TOKEN\"' >> .bazelrc.user cat .bazelrc.user + + +echo "$GITHUB_TOKEN" | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin +docker inspect ghcr.io/engflow/hello-world:1.0 From 80f3e953d10e2f819805e5e38d3347ac5fff29ed Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 27 Nov 2024 19:36:00 -0500 Subject: [PATCH 23/29] testing github auth --- .github/workflows/main.yml | 2 -- infra/test-github-auth.sh | 4 ---- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94223847..5e3c21af 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,8 +56,6 @@ jobs: run: infra/test-github-auth.sh - name: Generate python requirements lock - env: - GITHUB_ACTOR: ${{ github.actor }} shell: bash run: bazel run //python:requirements.update diff --git a/infra/test-github-auth.sh b/infra/test-github-auth.sh index c6def5eb..f4bb8668 100755 --- a/infra/test-github-auth.sh +++ b/infra/test-github-auth.sh @@ -4,7 +4,3 @@ set -x touch .bazelrc.user echo 'build:opal_auth --remote_header=\"Authorization=Bearer $GITHUB_TOKEN\"' >> .bazelrc.user cat .bazelrc.user - - -echo "$GITHUB_TOKEN" | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin -docker inspect ghcr.io/engflow/hello-world:1.0 From 1fa3578cf6ff14bcc447c696b4b5732c7079c929 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 27 Nov 2024 19:43:41 -0500 Subject: [PATCH 24/29] cleaning up now that github auth is working --- .github/workflows/main.yml | 2 +- infra/test-buck2.sh | 2 +- infra/test-github-auth.sh | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100755 infra/test-github-auth.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e3c21af..e26b86ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,7 +53,7 @@ jobs: - name: Set up authentication shell: bash - run: infra/test-github-auth.sh + run: cp infra/bazelrc .bazelrc.user - name: Generate python requirements lock shell: bash diff --git a/infra/test-buck2.sh b/infra/test-buck2.sh index b94916fe..9d77def6 100755 --- a/infra/test-buck2.sh +++ b/infra/test-buck2.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -x +set -xe # Run cpp example cd buck2/cpp diff --git a/infra/test-github-auth.sh b/infra/test-github-auth.sh deleted file mode 100755 index f4bb8668..00000000 --- a/infra/test-github-auth.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -x - -touch .bazelrc.user -echo 'build:opal_auth --remote_header=\"Authorization=Bearer $GITHUB_TOKEN\"' >> .bazelrc.user -cat .bazelrc.user From a7b06acc9cb55173b5a3881f98708954569acdae Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 27 Nov 2024 19:45:31 -0500 Subject: [PATCH 25/29] fail on error on buck2 ci setup --- infra/auth-buck2.sh | 2 +- infra/setup-buck2.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/auth-buck2.sh b/infra/auth-buck2.sh index 663a80ea..2101af05 100755 --- a/infra/auth-buck2.sh +++ b/infra/auth-buck2.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -x +set -xe # Modify the buck2/**/.buckconfig files to set the test cluster to opal. find ./ -type f -name '.buckconfig' -exec sed -i 's//opal/g' {} \; diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index e70aac43..bb17a953 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -x +set -xe # Build zstd: Remove once zstd is insalled in CI runner. git clone https://github.com/facebook/zstd.git From 3d19f29c46f0251c042a96f02ef3530f7eb2b668 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Mon, 2 Dec 2024 13:20:11 -0500 Subject: [PATCH 26/29] use installed zstd --- .github/workflows/main.yml | 2 +- infra/setup-buck2.sh | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e26b86ce..bdb587c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -108,7 +108,7 @@ jobs: - self-hosted - "os=linux" - "arch=x64" - - "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian11-dind-x64@sha256:604855f1ecd6edad3f45f513ed0112b9e8e32589871133767a1a51944b07f487" + - "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian11-dind-x64@sha256:a0f386162b6498b9220a33f33f158fd175d2873ddd6ed30ca67aa33915850e1e" - "engflow-pool=ci_sysbox_x64" - "engflow-runtime=sysbox-runc" - "engflow-runner-id=${{ github.repository_id }}_buck2-test_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}" diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index bb17a953..09faf0f2 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -1,21 +1,11 @@ #!/usr/bin/env bash set -xe -# Build zstd: Remove once zstd is insalled in CI runner. -git clone https://github.com/facebook/zstd.git -cd zstd/ -make -cd .. - # Get the Buck2 binary. curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-musl.zst - - # Unpack the binary. -# Use installed zstd once available in the CI runner. -./zstd/zstd -d buck2-x86_64-unknown-linux-musl.zst -# unzstd buck2-x86_64-unknown-linux-musl.zst +unzstd buck2-x86_64-unknown-linux-musl.zst # Change its name and make it executable. mv buck2-x86_64-unknown-linux-musl buck2-exe From fcec9c680198118d38db0fc1a55e88388b0cf239 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 4 Dec 2024 12:12:02 -0500 Subject: [PATCH 27/29] review comments --- buck2/cpp/.buckconfig | 2 +- buck2/cpp/README.md | 6 ++++-- buck2/golang/.buckconfig | 2 +- buck2/golang/README.md | 6 ++++-- buck2/python/.buckconfig | 2 +- buck2/python/README.md | 6 ++++-- infra/auth-buck2.sh | 2 +- infra/setup-buck2.sh | 2 ++ infra/test-buck2.sh | 12 ++++++------ 9 files changed, 24 insertions(+), 16 deletions(-) diff --git a/buck2/cpp/.buckconfig b/buck2/cpp/.buckconfig index c3ac155e..8af31dd8 100644 --- a/buck2/cpp/.buckconfig +++ b/buck2/cpp/.buckconfig @@ -41,7 +41,7 @@ digest_algorithms = SHA256 engine_address = .cluster.engflow.com action_cache_address = .cluster.engflow.com cas_address = .cluster.engflow.com -http_headers = x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING +http_headers = [build] execution_platforms = root//platforms:remote_platform diff --git a/buck2/cpp/README.md b/buck2/cpp/README.md index f75bbd7f..1f1751f2 100644 --- a/buck2/cpp/README.md +++ b/buck2/cpp/README.md @@ -35,10 +35,12 @@ following: engine_address = .cluster.engflow.com action_cache_address = .cluster.engflow.com cas_address = .cluster.engflow.com -http_headers = x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING +http_headers = ``` - To obtain the value of `LONG_JWT_STRING`, log into https://.cluster.engflow.com/gettingstarted and use the value of `x-engflow-auth-token` in section `Method 2: JWT`. + To obtain the value of ``, log into https://.cluster.engflow.com/gettingstarted and obtain the value of `x-engflow-auth-token` in section `Method 2: JWT`, take note of this value. Then set `AUTH_HTTP_HEADERS` with the value `x-engflow-auth-method:jwt-v0,x-engflow-auth-token:. + + Note for CI runs, the auth method used is [Github Tokens](https://docs.engflow.com/re/config/authentication.html#github-tokens). ### Usage instructions diff --git a/buck2/golang/.buckconfig b/buck2/golang/.buckconfig index 260c1f66..8e773e99 100644 --- a/buck2/golang/.buckconfig +++ b/buck2/golang/.buckconfig @@ -23,7 +23,7 @@ digest_algorithms = SHA256 engine_address = .cluster.engflow.com action_cache_address = .cluster.engflow.com cas_address = .cluster.engflow.com -http_headers = x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING +http_headers = [build] execution_platforms = root//platforms:remote_platform diff --git a/buck2/golang/README.md b/buck2/golang/README.md index 603c5404..41deea4e 100644 --- a/buck2/golang/README.md +++ b/buck2/golang/README.md @@ -46,7 +46,9 @@ following: engine_address = .cluster.engflow.com action_cache_address = .cluster.engflow.com cas_address = .cluster.engflow.com -http_headers = x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING +http_headers = ``` -To obtain the value of `LONG_JWT_STRING`, log into https://.cluster.engflow.com/gettingstarted and use the value of `x-engflow-auth-token` in section `Method 2: JWT`. +To obtain the value of ``, log into https://.cluster.engflow.com/gettingstarted and obtain the value of `x-engflow-auth-token` in section `Method 2: JWT`, take note of this value. Then set `AUTH_HTTP_HEADERS` with the value `x-engflow-auth-method:jwt-v0,x-engflow-auth-token:. + +Note for CI runs, the auth method used is [Github Tokens](https://docs.engflow.com/re/config/authentication.html#github-tokens). diff --git a/buck2/python/.buckconfig b/buck2/python/.buckconfig index 260c1f66..8e773e99 100644 --- a/buck2/python/.buckconfig +++ b/buck2/python/.buckconfig @@ -23,7 +23,7 @@ digest_algorithms = SHA256 engine_address = .cluster.engflow.com action_cache_address = .cluster.engflow.com cas_address = .cluster.engflow.com -http_headers = x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING +http_headers = [build] execution_platforms = root//platforms:remote_platform diff --git a/buck2/python/README.md b/buck2/python/README.md index 09dbc504..ff0e9af6 100644 --- a/buck2/python/README.md +++ b/buck2/python/README.md @@ -49,7 +49,9 @@ following: engine_address = .cluster.engflow.com action_cache_address = .cluster.engflow.com cas_address = .cluster.engflow.com -http_headers = x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING +http_headers = ``` -To obtain the value of `LONG_JWT_STRING`, log into https://.cluster.engflow.com/gettingstarted and use the value of `x-engflow-auth-token` in section `Method 2: JWT`. +To obtain the value of ``, log into https://.cluster.engflow.com/gettingstarted and obtain the value of `x-engflow-auth-token` in section `Method 2: JWT`, take note of this value. Then set `AUTH_HTTP_HEADERS` with the value `x-engflow-auth-method:jwt-v0,x-engflow-auth-token:. + +Note for CI runs, the auth method used is [Github Tokens](https://docs.engflow.com/re/config/authentication.html#github-tokens). diff --git a/infra/auth-buck2.sh b/infra/auth-buck2.sh index 2101af05..6cfbf1a6 100755 --- a/infra/auth-buck2.sh +++ b/infra/auth-buck2.sh @@ -5,5 +5,5 @@ set -xe find ./ -type f -name '.buckconfig' -exec sed -i 's//opal/g' {} \; # Modify the buck2/**/.buckconfig files to set the "Authorization=Bearer $GITHUB_TOKEN" in the http_headers. -find ./ -type f -name '.buckconfig' -exec sed -i 's/x-engflow-auth-method:jwt-v0,x-engflow-auth-token:LONG_JWT_STRING/Authorization:Bearer $GITHUB_TOKEN/g' {} \; +find ./ -type f -name '.buckconfig' -exec sed -i 's//Authorization:Bearer $GITHUB_TOKEN/g' {} \; diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index 09faf0f2..93e6fcb2 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -10,3 +10,5 @@ unzstd buck2-x86_64-unknown-linux-musl.zst # Change its name and make it executable. mv buck2-x86_64-unknown-linux-musl buck2-exe chmod +x buck2-exe + +alias buck2="$(realpath buck2-exe)" diff --git a/infra/test-buck2.sh b/infra/test-buck2.sh index 9d77def6..fdcffd90 100755 --- a/infra/test-buck2.sh +++ b/infra/test-buck2.sh @@ -3,18 +3,18 @@ set -xe # Run cpp example cd buck2/cpp -../../buck2-exe build //:cpp_lib -../../buck2-exe test //:cpp_test +buck2 build //:cpp_lib +buck2 test //:cpp_test cd .. # Run python example cd python -../../buck2-exe build //main:check_main -../../buck2-exe test //hello:hello_unittest_test +buck2 build //main:check_main +buck2 test //hello:hello_unittest_test cd .. # Run go example cd golang -../../buck2-exe build //go:hello -../../buck2-exe test //go/greeting:greeting_test +buck2 build //go:hello +buck2 test //go/greeting:greeting_test cd .. From 9ad4056a115832c7f71ccbb4fcf9f3c1a383f983 Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 4 Dec 2024 12:16:24 -0500 Subject: [PATCH 28/29] move alias declaration to test-buck2.sh --- infra/setup-buck2.sh | 2 -- infra/test-buck2.sh | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/setup-buck2.sh b/infra/setup-buck2.sh index 93e6fcb2..09faf0f2 100755 --- a/infra/setup-buck2.sh +++ b/infra/setup-buck2.sh @@ -10,5 +10,3 @@ unzstd buck2-x86_64-unknown-linux-musl.zst # Change its name and make it executable. mv buck2-x86_64-unknown-linux-musl buck2-exe chmod +x buck2-exe - -alias buck2="$(realpath buck2-exe)" diff --git a/infra/test-buck2.sh b/infra/test-buck2.sh index fdcffd90..82bbf31b 100755 --- a/infra/test-buck2.sh +++ b/infra/test-buck2.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash set -xe +alias buck2="$(realpath buck2-exe)" + # Run cpp example cd buck2/cpp buck2 build //:cpp_lib From ec8855311a797e78e463b23900173e7aef6fe18b Mon Sep 17 00:00:00 2001 From: Nicolas Lopez Date: Wed, 4 Dec 2024 12:20:54 -0500 Subject: [PATCH 29/29] enabling aliases in shell script --- infra/test-buck2.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/infra/test-buck2.sh b/infra/test-buck2.sh index 82bbf31b..710c9bba 100755 --- a/infra/test-buck2.sh +++ b/infra/test-buck2.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -xe +shopt -s expand_aliases alias buck2="$(realpath buck2-exe)"