diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1eb6a7abeb4..5f78f2695a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: jobs: build-bicep: - name: 'Build CLI' + name: 'Build CLI (${{ matrix.rid }})' runs-on: ${{ matrix.os }} env: @@ -24,7 +24,6 @@ jobs: fail-fast: false matrix: - os: [ 'windows-latest', 'ubuntu-latest', 'macos-latest' ] include: - os: 'windows-latest' rid: 'win-x64' @@ -34,6 +33,10 @@ jobs: rid: 'linux-x64' configuration: 'release' publishLanguageServer: 'true' + - os: 'ubuntu-latest' + rid: 'linux-musl-x64' + configuration: 'release' + publishLanguageServer: 'false' - os: 'macos-latest' rid: 'osx-x64' configuration: 'release' @@ -62,11 +65,21 @@ jobs: run: dotnet publish --configuration ${{ matrix.configuration }} --self-contained true -p:PublishTrimmed=true -p:PublishSingleFile=true -r ${{ matrix.rid }} ./src/Bicep.Cli/Bicep.Cli.csproj - name: Run Bicep E2E Tests + if: ${{ matrix.rid != 'linux-musl-x64' }} run: npm ci && npm test env: BICEP_CLI_EXECUTABLE: ../Bicep.Cli/bin/${{ matrix.configuration }}/net5.0/${{ matrix.rid }}/publish/bicep working-directory: ./src/Bicep.Cli.E2eTests + - name: Run Bicep E2E Tests (linux-musl-x64) + if: ${{ matrix.rid == 'linux-musl-x64' }} + uses: docker://microsoft/azure-cli:latest + with: + entrypoint: sh + args: -c "apk add --update nodejs npm && npm ci --prefix ./src/Bicep.Cli.E2eTests && npm test --prefix ./src/Bicep.Cli.E2eTests" + env: + BICEP_CLI_EXECUTABLE: ../Bicep.Cli/bin/${{ matrix.configuration }}/net5.0/${{ matrix.rid }}/publish/bicep + - name: Upload Language Server uses: actions/upload-artifact@v2 if: ${{ matrix.publishLanguageServer == 'true' }} diff --git a/.pipelines/Common.yml b/.pipelines/Common.yml index bd4aebb5465..390d915e44e 100644 --- a/.pipelines/Common.yml +++ b/.pipelines/Common.yml @@ -41,6 +41,24 @@ stages: official: ${{ parameters.official }} rid: linux-x64 + - job: bicep_linux_musl + pool: + type: linux # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs + + variables: + ob_outputDirectory: '$(Build.SourcesDirectory)/out' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts + # https://aka.ms/obpipelines/sdl + ob_sdl_binskim_enabled: true # you can disable sdl tools in non-official build + ob_sdl_binskim_break: false # always break the build on binskim issues. You can disable it by setting to 'false' + ob_sdl_binskim_scanOutputDirectoryOnly: true + ob_sdl_roslyn_break: true + # ob_sdl_suppression_suppressionFile: $(Build.SourcesDirectory)\.gdn\job.gdnsuppress + steps: + - template: Bicep.yml + parameters: + official: ${{ parameters.official }} + rid: linux-musl-x64 + - job: bicep_osx pool: type: linux # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs