Try merging Windows build into the standard worklfow

This commit is contained in:
Anton Tayanovskyy 2021-11-19 22:51:32 -05:00
parent ece2325694
commit 94dab380e5

View file

@ -137,7 +137,7 @@ jobs:
needs: build
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest ]
platform: [ ubuntu-latest, macos-latest, windows-latest ]
go-version: [ 1.17.x ]
python-version: [ 3.9.x ]
dotnet-version: [ 3.1.x ]
@ -168,6 +168,10 @@ jobs:
- name: Set PULUMI_TEST_SUBSET env var
run: |
echo "PULUMI_TEST_SUBSET=${{ matrix.test-subset }}" >> $GITHUB_ENV
- name: Install Make
if: ${{ matrix.platform == 'windows-latest' }}
run: |
choco install make
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:
@ -234,11 +238,24 @@ jobs:
with:
name: pulumi-darwin-x64.tar.gz
path: artifacts/go
- name: Download Pulumi Go Binaries (windows-x64)
if: ${{ matrix.platform == 'windows-latest' }}
uses: actions/download-artifact@v2
with:
name: pulumi-windows-x64.zip
path: artifacts/go
- name: Install Pulumi Go Binaries
if: ${{ matrix.platform != 'windows-latest' }}
run: |
mkdir -p bin
tar -xf artifacts/go/*.tar.gz -C bin
echo "$PWD/bin/pulumi" >> $GITHUB_PATH
- name: Install Pulumi Go Binaries
if: ${{ matrix.platform == 'windows-latest' }}
run: |
mkdir -p bin
unzip -xf artifacts/go/*.zip -d bin
echo "$PWD/bin/pulumi" >> $GITHUB_PATH
- name: Download Pulumi .NET NuGet packages
uses: actions/download-artifact@v2
with:
@ -290,104 +307,101 @@ jobs:
run: |
goteststats -statistic test-time test-results/*.json | head -n 100
windows-build:
name: Windows Build + Test
strategy:
matrix:
go-version: [1.17.x]
node-version: [14.x]
python-version: [3.9.x]
dotnet: [3.1.x]
if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: windows-latest
env:
GOPATH: ${{ github.workspace }}
PULUMI_LOCAL_NUGET: "D:\\Pulumi\\nuget"
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Install Make
run: |
choco install make
- name: Checkout Repo
uses: actions/checkout@v2
with:
ref: ${{ env.PR_COMMIT_SHA }}
- name: Test Make
run: |
make -n ensure
# - name: Install DotNet ${{ matrix.dotnet }}
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: ${{ matrix.dotnet }}
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
# - name: Set up Go ${{ matrix.go-version }}
# uses: actions/setup-go@v1
# with:
# go-version: ${{ matrix.go-version }}
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install Python Deps
# run: |
# pip3 install pyenv-win
# pip3 install pipenv
# - name: Create Local Nuget
# run: mkdir -p "${{ env.PULUMI_LOCAL_NUGET }}"
# shell: bash
# - run: dotnet nuget add source ${{ env.PULUMI_LOCAL_NUGET }}
# - name: Set Build Env Vars
# shell: bash
# run: |
# echo "D:\\Pulumi\\bin" >> $GITHUB_PATH
# - name: Install AWS CLI Tools
# uses: chrislennon/action-aws-cli@v1.1
# - name: Install pulumictl
# uses: jaxxstorm/action-install-gh-release@v1.2.0
# with:
# repo: pulumi/pulumictl
# - name: Check out code into the Go module directory
# uses: actions/checkout@v2
# with:
# path: ./src/github.com/${{ github.repository }}
# ref: ${{ env.PR_COMMIT_SHA }}
# - name: Fetch Tags
# run: |
# cd ./src/github.com/${{ github.repository }} && git fetch --quiet --prune --unshallow --tags
# - name: Clean
# run: dotnet nuget locals all --clear
# - name: Create Local Nuget
# run: mkdir -p "D:\\Pulumi\\nuget"
# shell: bash
# - name: Get dependencies
# run: |
# cd src\github.com\${{ github.repository }}
# pushd .
# cd sdk
# go mod download
# popd
# pushd .
# cd pkg
# go mod download
# popd
# pushd .
# cd tests
# go mod download
# popd
# - name: Build Pulumi
# run: |
# cd src\github.com\${{ github.repository }}
# dotnet msbuild /t:Build /v:Detailed build.proj /p:PulumiRoot="D:\\Pulumi" /p:PythonVersion="${{ matrix.python-version }}"
# - run: |
# which pulumi
# pulumi version
# shell: bash
# - name: Run Pulumi Tests
# env:
# PYTHON_VERSION: ${{ matrix.python-version }}
# run: |
# cd src\github.com\${{ github.repository }}
# dotnet msbuild /t:Tests /v:Detailed build.proj /p:PulumiRoot="D:\\Pulumi" /p:PythonVersion="${{ matrix.python-version }}"
# windows-build:
# name: Windows Build + Test
# strategy:
# matrix:
# go-version: [1.17.x]
# node-version: [14.x]
# python-version: [3.9.x]
# dotnet: [3.1.x]
# if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
# runs-on: windows-latest
# env:
# GOPATH: ${{ github.workspace }}
# PULUMI_LOCAL_NUGET: "D:\\Pulumi\\nuget"
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true
# steps:
# - name: Checkout Repo
# uses: actions/checkout@v2
# with:
# ref: ${{ env.PR_COMMIT_SHA }}
# - name: Test Make
# run: |
# make -n ensure
# # - name: Install DotNet ${{ matrix.dotnet }}
# # uses: actions/setup-dotnet@v1
# # with:
# # dotnet-version: ${{ matrix.dotnet }}
# # - name: Use Node.js ${{ matrix.node-version }}
# # uses: actions/setup-node@v1
# # with:
# # node-version: ${{ matrix.node-version }}
# # - name: Set up Go ${{ matrix.go-version }}
# # uses: actions/setup-go@v1
# # with:
# # go-version: ${{ matrix.go-version }}
# # - name: Set up Python ${{ matrix.python-version }}
# # uses: actions/setup-python@v2
# # with:
# # python-version: ${{ matrix.python-version }}
# # - name: Install Python Deps
# # run: |
# # pip3 install pyenv-win
# # pip3 install pipenv
# # - name: Create Local Nuget
# # run: mkdir -p "${{ env.PULUMI_LOCAL_NUGET }}"
# # shell: bash
# # - run: dotnet nuget add source ${{ env.PULUMI_LOCAL_NUGET }}
# # - name: Set Build Env Vars
# # shell: bash
# # run: |
# # echo "D:\\Pulumi\\bin" >> $GITHUB_PATH
# # - name: Install AWS CLI Tools
# # uses: chrislennon/action-aws-cli@v1.1
# # - name: Install pulumictl
# # uses: jaxxstorm/action-install-gh-release@v1.2.0
# # with:
# # repo: pulumi/pulumictl
# # - name: Check out code into the Go module directory
# # uses: actions/checkout@v2
# # with:
# # path: ./src/github.com/${{ github.repository }}
# # ref: ${{ env.PR_COMMIT_SHA }}
# # - name: Fetch Tags
# # run: |
# # cd ./src/github.com/${{ github.repository }} && git fetch --quiet --prune --unshallow --tags
# # - name: Clean
# # run: dotnet nuget locals all --clear
# # - name: Create Local Nuget
# # run: mkdir -p "D:\\Pulumi\\nuget"
# # shell: bash
# # - name: Get dependencies
# # run: |
# # cd src\github.com\${{ github.repository }}
# # pushd .
# # cd sdk
# # go mod download
# # popd
# # pushd .
# # cd pkg
# # go mod download
# # popd
# # pushd .
# # cd tests
# # go mod download
# # popd
# # - name: Build Pulumi
# # run: |
# # cd src\github.com\${{ github.repository }}
# # dotnet msbuild /t:Build /v:Detailed build.proj /p:PulumiRoot="D:\\Pulumi" /p:PythonVersion="${{ matrix.python-version }}"
# # - run: |
# # which pulumi
# # pulumi version
# # shell: bash
# # - name: Run Pulumi Tests
# # env:
# # PYTHON_VERSION: ${{ matrix.python-version }}
# # run: |
# # cd src\github.com\${{ github.repository }}
# # dotnet msbuild /t:Tests /v:Detailed build.proj /p:PulumiRoot="D:\\Pulumi" /p:PythonVersion="${{ matrix.python-version }}"