diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index f713cf1878..122fc8a3de 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -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 @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b84767897..675ee7592d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,7 @@ jobs: - name: build uses: ./.github/actions/build with: + SUDO: "" TARGET: '${{ matrix.target }}' TOOL: cross RUSTFLAGS: --cfg qemu -D warnings @@ -92,6 +93,7 @@ jobs: uses: ./.github/actions/test with: TARGET: '${{ matrix.target }}' + SUDO: "" TOOL: cross RUSTFLAGS: --cfg qemu -D warnings