diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml new file mode 100644 index 0000000..5ccc510 --- /dev/null +++ b/.github/workflows/ci-linux.yml @@ -0,0 +1,49 @@ +# Converted from .vsts-ci/linux.yml +name: Linux CI + +on: + push: + branches: + - master + - release* + pull_request: + branches: + - master + - release* + +env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + # Avoid expensive initialization of dotnet cli, see: http://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + +defaults: + run: + shell: pwsh + +permissions: + contents: read + +jobs: + build: + name: Linux - ${{ matrix.buildName }} + runs-on: ubuntu-latest + + strategy: + matrix: + buildName: + - ubuntu.16.04-arm + - ubuntu.16.04-arm64 + - centos.7 + - alpine + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + clean: true + + - name: Start build - ${{ matrix.buildName }} + if: success() + run: | + tools/releaseBuild/vstsBuild.ps1 -Name ${{ matrix.buildName }} -Verbose diff --git a/.github/workflows/ci-mac.yml b/.github/workflows/ci-mac.yml new file mode 100644 index 0000000..d68b1e2 --- /dev/null +++ b/.github/workflows/ci-mac.yml @@ -0,0 +1,47 @@ +# Converted from .vsts-ci/mac.yml +name: macOS CI + +on: + push: + branches: + - master + - release* + pull_request: + branches: + - master + - release* + +env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + # Avoid expensive initialization of dotnet cli, see: http://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + +defaults: + run: + shell: pwsh + +permissions: + contents: read + +jobs: + build: + name: Build + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + clean: true + + - name: Start build + run: | + tools/releaseBuild/PowershellNative.ps1 -Arch osx -Configuration Release -RepoRoot ${{ github.workspace }} -TargetLocation "${{ runner.temp }}/Packages" -Verbose + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + if: success() + with: + name: artifacts + path: ${{ runner.temp }}/Packages/osx-symbols.zip diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml new file mode 100644 index 0000000..3c5035d --- /dev/null +++ b/.github/workflows/ci-windows.yml @@ -0,0 +1,66 @@ +# Converted from .vsts-ci/windows.yml +# Note: The original pipeline used a self-hosted Azure DevOps pool (PS-PowerShell-x64) +# with a custom image (PSMMS2019-PS-Native-Secure). Update the runs-on value +# to a self-hosted runner label if one is available. +name: Windows CI + +on: + push: + branches: + - master + - release* + pull_request: + branches: + - master + - release* + +env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + # Avoid expensive initialization of dotnet cli, see: http://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + +defaults: + run: + shell: pwsh + +permissions: + contents: read + +jobs: + build: + name: Windows - ${{ matrix.buildName }} + runs-on: windows-latest + + strategy: + matrix: + include: + - buildName: x86 + - buildName: x64 + - buildName: x64_arm64 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + clean: true + + - name: Set Visual Studio Path + if: success() + run: | + $vsPath = ${Env:ProgramFiles(x86)} + '\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin' + "$vsPath" | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8 + + - name: Start build - ${{ matrix.buildName }} + if: success() + run: | + $cmakeBinPath = "$env:ProgramFiles\CMake\bin\" + if(Test-Path $cmakeBinPath) { $env:Path = "$cmakeBinPath;$env:PATH" } else { throw "CMake not installed under $cmakeBinPath" } + ${{ github.workspace }}\tools\releaseBuild\PowerShellNative.ps1 -RepoRoot ${{ github.workspace }} -TargetLocation "${{ runner.temp }}\Packages" -Arch ${{ matrix.buildName }} -Configuration Release -Symbols + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + if: success() + with: + name: artifacts-${{ matrix.buildName }} + path: ${{ runner.temp }}\Packages\${{ matrix.buildName }}-symbols.zip diff --git a/.github/workflows/misc-analysis.yml b/.github/workflows/misc-analysis.yml new file mode 100644 index 0000000..4468bcd --- /dev/null +++ b/.github/workflows/misc-analysis.yml @@ -0,0 +1,35 @@ +# Converted from .vsts-ci/misc-analysis.yml +# Note: The original pipeline used a private Azure DevOps compliance template +# (ci-compliance.yml@ComplianceRepo from PowerShell/compliance). That template +# is not available as a GitHub Actions workflow. The checkout steps are preserved +# and the compliance step is noted below for manual replacement. +name: Misc Analysis + +on: + push: + # Batch merge builds together while a merge build is running + branches: + - master + - release* + pull_request: + branches: + - master + - release* + +permissions: + contents: read + +jobs: + compliance: + name: Compliance Job + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + clean: true + + # The original pipeline ran the ci-compliance.yml template from the + # PowerShell/compliance Azure DevOps repository. Replace this step with + # the appropriate GitHub Actions compliance checks for your organization.