diff --git a/.github/actions/just-setup/action.yml b/.github/actions/just-setup/action.yml index 17572609..f57a949f 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,21 @@ runs: run: echo "tools=$tools,$inputs_tools" >>"$GITHUB_ENV" shell: bash + - name: Determine native target + run: | + if [ "$RUNNER_OS" = "Linux" ]; then RUNNER_TARGET=x86_64-unknown-linux-gnu; fi + if [ "$RUNNER_OS" = "macOS" ]; then RUNNER_TARGET=aarch64-apple-darwin; fi + if [ "$RUNNER_OS" = "Windows" ]; then RUNNER_TARGET=x86_64-pc-windows-msvc; fi + echo "RUNNER_TARGET=$RUNNER_TARGET" >>"$GITHUB_ENV" + shell: bash + - name: Install tools uses: taiki-e/install-action@v2 with: tool: ${{ env.tools }} - + env: + CARGO_BUILD_TARGET: ${{ env.RUNNER_TARGET }} + - name: Install rust toolchains run: just toolchain shell: bash @@ -134,13 +154,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