From 178974100a9a053e0546f9a0316e69c372b05efb Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Tue, 5 Nov 2024 19:45:51 +1100 Subject: [PATCH] Fix just-setup - install rust toolchain before calling install-action, just in case there's no available binary - configure THP/malloc at the start of action Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/actions/just-setup/action.yml | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/actions/just-setup/action.yml b/.github/actions/just-setup/action.yml index 17572609..77f5bd71 100644 --- a/.github/actions/just-setup/action.yml +++ b/.github/actions/just-setup/action.yml @@ -22,7 +22,17 @@ runs: if: runner.os == 'macOS' run: sudo spctl developer-mode enable-terminal shell: bash - + + - name: Enable transparent huge page + if: runner.os == 'Linux' + run: echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled + shell: bash + + - name: Configure jemalloc (used by rustc) to use transparent huge page + if: runner.os == 'Linux' + run: echo "MALLOC_CONF=thp:always,metadata_thp:always" >> "$GITHUB_ENV" + shell: bash + - name: Exclude workspace and cargo/rustup home from windows defender if: runner.os == 'Windows' run: | @@ -40,11 +50,6 @@ runs: run: echo "tools=$tools,$inputs_tools" >>"$GITHUB_ENV" shell: bash - - name: Install tools - uses: taiki-e/install-action@v2 - with: - tool: ${{ env.tools }} - - name: Install rust toolchains run: just toolchain shell: bash @@ -52,6 +57,11 @@ runs: - name: rustc version run: rustc -vV shell: bash + + - name: Install tools + uses: taiki-e/install-action@v2 + with: + tool: ${{ env.tools }} - name: Retrieve RUSTFLAGS for caching if: inputs.indexcache || inputs.buildcache @@ -134,13 +144,3 @@ runs: - run: make -v shell: bash - - - name: Enable transparent huge page - if: runner.os == 'Linux' - run: echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled - shell: bash - - - name: Configure jemalloc (used by rustc) to use transparent huge page - if: runner.os == 'Linux' - run: echo "MALLOC_CONF=thp:always,metadata_thp:always" >> "$GITHUB_ENV" - shell: bash