Skip to content

Commit

Permalink
separate sdk workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanstephens committed Mar 6, 2025
1 parent e9d22bb commit 1f891fd
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 28 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/sdks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
on:
pull_request:
paths-ignore:
- docs
- .devcontainer
- examples

jobs:
build_sdks:
name: Build SDKs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dotnetversion:
- 6.0.x
goversion:
- 1.21.x
nodeversion:
- 18.x
pythonversion:
- "3.9"
# javaversion:
# - "11"
language:
- nodejs
- python
- dotnet
- go
# - java

steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{matrix.goversion}}

- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl

- name: Install pulumi
uses: pulumi/actions@v5

- if: ${{ matrix.language == 'nodejs'}}
name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{matrix.nodeversion}}
registry-url: https://registry.npmjs.org

- if: ${{ matrix.language == 'dotnet'}}
name: Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{matrix.dotnetversion}}

- if: ${{ matrix.language == 'python'}}
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.pythonversion}}

- if: ${{ matrix.language == 'java'}}
name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: ${{matrix.javaversion}}

- name: Build SDK
run: make ${{ matrix.language }}_sdk

- name: Build Example
run: make ${{ matrix.language }}_example

- name: Check worktree clean
run: |
git update-index -q --refresh
if ! git diff-files --quiet; then
>&2 echo "error: working tree is not clean, aborting!"
git status
git diff
exit 1
fi
26 changes: 2 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{matrix.goversion}}
go-version: 1.22.x
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand All @@ -21,32 +21,10 @@ jobs:
run: git fetch --prune --unshallow --tags
- run: make provider
- run: make test
- run: make schema && git diff --exit-code -- provider/cmd/pulumi-resource-defang/schema.json
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.64
args: --timeout=5m --config=.golangci.yaml provider
- name: Ensure docs are up-to-date
run: |
make docs
git diff --quiet -- ./docs
- name: Ensure examples are up-to-date
run: |
make examples
git diff --quiet -- ./examples
- name: Ensure schema is up-to-date
run: |
make schema
git diff --quiet -- provider/cmd/pulumi-resource-defang/schema-defang.json
- name: Ensure sdks are up-to-date
run: |
make sdks
git diff --quiet -- ./sdks

strategy:
fail-fast: true
matrix:
goversion:
# - 1.18.x
- 1.22.x

2 changes: 1 addition & 1 deletion examples/dotnet/provider-defang.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.Defang" Version="1.1.0-alpha.1741220010+8d69e1ac" />
<PackageReference Include="Pulumi.Defang" Version="1.1.0-alpha.1741220968+0411d9f3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion examples/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ go 1.20

require (
github.com/pulumi/pulumi/sdk/v3 v3.30.0
example.com/pulumi-defang/sdk v1.1.0-alpha.1741220010+8d69e1ac
example.com/pulumi-defang/sdk v1.1.0-alpha.1741220968+0411d9f3
)
2 changes: 1 addition & 1 deletion examples/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"dependencies": {
"typescript": "^4.0.0",
"@pulumi/pulumi": "^3.0.0",
"@defang-io/pulumi-defang": "1.1.0-alpha.1741220010+8d69e1ac"
"@defang-io/pulumi-defang": "1.1.0-alpha.1741220968+0411d9f3"
}
}
2 changes: 1 addition & 1 deletion examples/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pulumi-defang==1.1.0-alpha.1741220010+8d69e1ac
pulumi-defang==1.1.0-alpha.1741220968+0411d9f3
pulumi>=3.0.0,<4.0.0

0 comments on commit 1f891fd

Please sign in to comment.