mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 12:10:02 +00:00
CI: Fix just-setup (#1957)
* 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> * Fix rust installation Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix target passed to install-action Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Add missing shell Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix typo Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix passing target to install-action Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
2c1f156332
commit
04d28b1f5c
1 changed files with 22 additions and 12 deletions
30
.github/actions/just-setup/action.yml
vendored
30
.github/actions/just-setup/action.yml
vendored
|
@ -23,6 +23,16 @@ runs:
|
||||||
run: sudo spctl developer-mode enable-terminal
|
run: sudo spctl developer-mode enable-terminal
|
||||||
shell: bash
|
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
|
- name: Exclude workspace and cargo/rustup home from windows defender
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
run: |
|
run: |
|
||||||
|
@ -40,10 +50,20 @@ runs:
|
||||||
run: echo "tools=$tools,$inputs_tools" >>"$GITHUB_ENV"
|
run: echo "tools=$tools,$inputs_tools" >>"$GITHUB_ENV"
|
||||||
shell: bash
|
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
|
- name: Install tools
|
||||||
uses: taiki-e/install-action@v2
|
uses: taiki-e/install-action@v2
|
||||||
with:
|
with:
|
||||||
tool: ${{ env.tools }}
|
tool: ${{ env.tools }}
|
||||||
|
env:
|
||||||
|
CARGO_BUILD_TARGET: ${{ env.RUNNER_TARGET }}
|
||||||
|
|
||||||
- name: Install rust toolchains
|
- name: Install rust toolchains
|
||||||
run: just toolchain
|
run: just toolchain
|
||||||
|
@ -134,13 +154,3 @@ runs:
|
||||||
|
|
||||||
- run: make -v
|
- run: make -v
|
||||||
shell: bash
|
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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue