Skip to content

Commit

Permalink
Update GitHub Actions workflows. (#553)
Browse files Browse the repository at this point in the history
This PR was automatically generated by the
update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt
repo, from commit e4f15688017ee624e9014edafffee8e5634edd49.
  • Loading branch information
pulumi-bot authored Nov 26, 2024
1 parent 28f3738 commit 9bb73cc
Show file tree
Hide file tree
Showing 9 changed files with 250 additions and 120 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, go
- name: Prepare local workspace before restoring previously built
run: make prepare_local_workspace
- name: Download schema-embed.json
uses: actions/download-artifact@v4
with:
Expand All @@ -45,9 +47,11 @@ jobs:
# Avoid creating directories for each artifact
merge-multiple: true
path: provider/cmd/pulumi-resource-consul/schema-embed.json
- name: Prepare for build
# This installs plugins and prepares upstream
run: make upstream
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
- name: Build & package provider
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
- name: Upload artifacts
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,17 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Prepare local workspace
run: make prepare_local_workspace
- name: Download bin
uses: ./.github/actions/download-bin
- name: Install plugins
run: make install_plugins
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
- name: Build SDK
run: make build_${{ matrix.language }}
- name: Check worktree clean
Expand All @@ -75,3 +80,9 @@ jobs:
uses: ./.github/actions/upload-sdk
with:
language: ${{ matrix.language }}
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
include-hidden-files: true
10 changes: 7 additions & 3 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,19 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Prepare local workspace
run: make prepare_local_workspace
- name: Download bin
uses: ./.github/actions/download-bin
- name: Add NuGet source
if: matrix.language == 'dotnet'
run: dotnet nuget add source ${{ github.workspace }}/nuget
- name: Download SDK
uses: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,19 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, nodejs, python, dotnet, go, java
- name: Prepare local workspace
run: make prepare_local_workspace
- name: Download bin
uses: ./.github/actions/download-bin
- name: Add NuGet source
if: matrix.language == 'dotnet'
run: dotnet nuget add source ${{ github.workspace }}/nuget
- name: Download SDK
uses: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,16 @@ jobs:
path: |
.pulumi/examples-cache
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }}
- name: Prepare upstream code
run: make upstream
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: go, pulumictl, pulumicli, schema-tools
- name: Build schema generator binary
run: make tfgen_build_only
- name: Install plugins
run: make install_plugins
- name: Prepare local workspace before restoring previously built files
run: make prepare_local_workspace
- name: Generate schema
run: make tfgen_no_deps
run: make schema
- name: Build provider binary
run: make provider_no_deps
run: make provider
- name: Unit-test provider code
run: make test_provider
- if: inputs.is_pr
Expand All @@ -81,6 +77,12 @@ jobs:
schema-tools compare -r github://api.github.com/pulumi -p consul -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-consul/schema.json;
echo "$EOF";
} >> "$GITHUB_ENV"
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: prerequisites.make
path: .make
include-hidden-files: true
- if: inputs.is_pr && inputs.is_automated == false
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,19 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Prepare local workspace
run: make prepare_local_workspace
- name: Download bin
uses: ./.github/actions/download-bin
- name: Add NuGet source
if: matrix.language == 'dotnet'
run: dotnet nuget add source ${{ github.workspace }}/nuget
- name: Download SDK
uses: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,19 @@ jobs:
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Prepare local workspace
run: make prepare_local_workspace
- name: Download bin
uses: ./.github/actions/download-bin
- name: Add NuGet source
if: matrix.language == 'dotnet'
run: dotnet nuget add source ${{ github.workspace }}/nuget
- name: Download SDK
uses: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ sdk/java/gradlew.bat


sdk/python/venv


# Ignore local build tracking directory
.make
Loading

0 comments on commit 9bb73cc

Please sign in to comment.