Skip to content

Install build wrapper action - bash not found #15

@elliott-bfs

Description

@elliott-bfs

I'm using a Windows runner and attempting to integrate the build-wrapper script into my build (Microchip MPLAB X project, using XC8 compiler which is based on clang). However, the windows runner I have set up apparently does not have bash installed on it.

Output of SonarSource/sonarqube-scan-action/install-build-wrapper action:

Run SonarSource/sonarqube-scan-action/install-build-wrapper@v4
  env:
    GH_TOKEN: ***
    SONAR_HOST_URL: ***
Run ${GITHUB_ACTION_PATH}/../scripts/configure_paths.sh >> $GITHUB_OUTPUT
  ${GITHUB_ACTION_PATH}/../scripts/configure_paths.sh >> $GITHUB_OUTPUT
  Error: bash: command not found

Sanitized workflow file:

name: PROJECT
on: 
  push:
  pull_request:
    types: [opened, synchronize, reopened]

env:
  GH_TOKEN: ${{ secrets.ACTIONS_TOKEN }}

jobs:
  checkout:
    runs-on: [self-hosted, windows, project-runner]
    steps:
    - name: checkout
      uses: actions/checkout@v4
      with:
        submodules: recursive
        token: ${{ secrets.ACTIONS_TOKEN }}
  
  build:
    if: always()
    needs: [checkout]
    runs-on: [self-hosted, windows, project-runner]
    steps:
    - name: Install Build Wrapper
      uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v4
      env:
        SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
    - name: Clean Build
      run: |
        cd PROJECT.X
        build-wrapper-win-x86-64.exe --out-dir ../build/sonarqube/wrapper make clean all

  code-analysis:
    needs: [build]
    runs-on: [self-hosted, windows, project-runner]
    steps:
    - name: SonarQube Scan
      uses: sonarsource/sonarqube-scan-action@v4
      env:
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
        SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

Is bash a hard requirement? I may or may not be able to install it on the runner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions