Skip to content

Commit

Permalink
chore(ci): fix firefox wasm benchmarks with new aws ami
Browse files Browse the repository at this point in the history
Some libs were missing to be able to run Firefox out of the box.
Besides, action runner is now installed as ubuntu user since
Firefox is not able to run as root.
  • Loading branch information
soonum committed Oct 16, 2024
1 parent 96571ba commit 483a4fe
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 33 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/aws_tfhe_fast_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ jobs:
persist-credentials: 'false'
token: ${{ secrets.FHE_ACTIONS_TOKEN }}

- name: Set up home
run: |
echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}"
- name: Install latest stable
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
with:
Expand Down Expand Up @@ -198,7 +194,8 @@ jobs:
- name: Run js on wasm API tests
if: needs.should-run.outputs.wasm_test == 'true'
run: |
make test_nodejs_wasm_api_in_docker
make install_node
make test_nodejs_wasm_api_ci
- name: Gen Keys if required
if: needs.should-run.outputs.shortint_test == 'true' ||
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/aws_tfhe_wasm_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ jobs:
persist-credentials: 'false'
token: ${{ secrets.FHE_ACTIONS_TOKEN }}

- name: Set up home
run: |
echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}"
- name: Install latest stable
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
with:
Expand All @@ -71,7 +67,7 @@ jobs:
- name: Run js on wasm API tests
run: |
make test_nodejs_wasm_api_in_docker
make test_nodejs_wasm_api_ci
- name: Run parallel wasm tests
run: |
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/benchmark_wasm_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ jobs:
echo "COMMIT_HASH=$(git describe --tags --dirty)";
} >> "${GITHUB_ENV}"
- name: Set up home
# "Install rust" step require root user to have a HOME directory which is not set.
run: |
echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}"
- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
with:
Expand Down
22 changes: 6 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -919,26 +919,16 @@ check_compile_tests_benches_gpu: install_rs_build_toolchain
cmake .. -DCMAKE_BUILD_TYPE=Debug -DTFHE_CUDA_BACKEND_BUILD_TESTS=ON -DTFHE_CUDA_BACKEND_BUILD_BENCHMARKS=ON && \
"$(MAKE)" -j "$(CPU_COUNT)"

.PHONY: build_nodejs_test_docker # Build a docker image with tools to run nodejs tests for wasm API
build_nodejs_test_docker:
DOCKER_BUILDKIT=1 docker build --build-arg RUST_TOOLCHAIN="$(RS_BUILD_TOOLCHAIN)" \
-f docker/Dockerfile.wasm_tests --build-arg NODE_VERSION=$(NODE_VERSION) -t tfhe-wasm-tests .

.PHONY: test_nodejs_wasm_api_in_docker # Run tests for the nodejs on wasm API in a docker container
test_nodejs_wasm_api_in_docker: build_nodejs_test_docker
if [[ -t 1 ]]; then RUN_FLAGS="-it"; else RUN_FLAGS="-i"; fi && \
docker run --rm "$${RUN_FLAGS}" \
-v "$$(pwd)":/tfhe-wasm-tests/tfhe-rs \
-v tfhe-rs-root-target-cache:/root/tfhe-rs-target \
-v tfhe-rs-pkg-cache:/tfhe-wasm-tests/tfhe-rs/tfhe/pkg \
-v tfhe-rs-root-cargo-registry-cache:/root/.cargo/registry \
-v tfhe-rs-root-cache:/root/.cache \
tfhe-wasm-tests /bin/bash -i -c 'make test_nodejs_wasm_api'

.PHONY: test_nodejs_wasm_api # Run tests for the nodejs on wasm API
test_nodejs_wasm_api: build_node_js_api
cd tfhe/js_on_wasm_tests && npm install && npm run test

.PHONY: test_nodejs_wasm_api_ci # Run tests for the nodejs on wasm API
test_nodejs_wasm_api_ci: build_node_js_api
source ~/.nvm/nvm.sh && \
nvm install $(NODE_VERSION) && \
nvm use $(NODE_VERSION) && \
$(MAKE) test_nodejs_wasm_api

# This is an internal target, not meant to be called on its own.
run_web_js_api_parallel: build_web_js_api_parallel setup_venv
Expand Down
5 changes: 3 additions & 2 deletions ci/slab.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[backend.aws.cpu-big]
region = "eu-west-3"
image_id = "ami-09b5f2f71828035d4"
image_id = "ami-0cd5012d17ae64070"
instance_type = "m6i.32xlarge"

[backend.aws.cpu-big_fallback]
Expand All @@ -10,8 +10,9 @@ instance_type = "m6i.32xlarge"

[backend.aws.cpu-small]
region = "eu-west-3"
image_id = "ami-09b5f2f71828035d4"
image_id = "ami-0cd5012d17ae64070"
instance_type = "m6i.4xlarge"
user = "ubuntu"

[backend.aws.bench]
region = "eu-west-1"
Expand Down

0 comments on commit 483a4fe

Please sign in to comment.