Skip to content

Commit

Permalink
Don't use sudo with cross
Browse files Browse the repository at this point in the history
This is a known issue upstream:
cross-rs/cross#526
  • Loading branch information
asomers committed Jan 6, 2024
1 parent 1dfffca commit 788ed63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ inputs:
TARGET:
required: true

SUDO:
description: 'Set to "sudo" to run the build with sudo, or leave undefined to run as the current user'
required: false
default: sudo

TOOL:
description: 'Tool used to involve the test command, can be cargo or cross'
required: false
Expand All @@ -24,4 +29,4 @@ runs:
- name: test
shell: bash
run: sudo --preserve-env=HOME $(which ${{ inputs.TOOL }}) test ${{ inputs.TARGET }} --all-features
run: ${{ inputs.SUDO }} --preserve-env=HOME $(which ${{ inputs.TOOL }}) test ${{ inputs.TARGET }} --all-features
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
- name: build
uses: ./.github/actions/build
with:
SUDO: ""
TARGET: '${{ matrix.target }}'
TOOL: cross
RUSTFLAGS: --cfg qemu -D warnings
Expand All @@ -92,6 +93,7 @@ jobs:
uses: ./.github/actions/test
with:
TARGET: '${{ matrix.target }}'
SUDO: ""
TOOL: cross
RUSTFLAGS: --cfg qemu -D warnings

Expand Down

0 comments on commit 788ed63

Please sign in to comment.