diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ec88dcab..d1b26b1a 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -55,6 +55,12 @@ jobs: cache-dependency-path: | sdk/go.sum go-version: 1.21.x + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -210,6 +216,12 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - name: Checkout Scripts Repo uses: actions/checkout@v4 with: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 84edc2c0..d1615279 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -56,6 +56,12 @@ jobs: cache-dependency-path: | sdk/go.sum go-version: 1.21.x + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -149,6 +155,12 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - name: Checkout Scripts Repo uses: actions/checkout@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83732ac5..8eec969c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,12 @@ jobs: cache-dependency-path: | sdk/go.sum go-version: 1.21.x + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -163,6 +169,12 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - name: Checkout Scripts Repo uses: actions/checkout@v4 with: diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 966d7864..8e82707f 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -65,6 +65,12 @@ jobs: cache-dependency-path: | sdk/go.sum go-version: 1.21.x + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - name: Install pulumictl uses: jaxxstorm/action-install-gh-release@v1.11.0 with: @@ -173,6 +179,12 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Cache examples generation + uses: actions/cache@v4 + with: + path: | + .pulumi/examples-cache + key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} - name: Checkout Scripts Repo uses: actions/checkout@v4 with: diff --git a/Makefile b/Makefile index 25591b95..e5d5e5cf 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ only_build: build build_dotnet: DOTNET_VERSION := $(shell pulumictl get version --language dotnet) build_dotnet: export PULUMI_HOME := $(WORKING_DIR)/.pulumi build_dotnet: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) +build_dotnet: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache build_dotnet: upstream pulumictl get version --language dotnet PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) dotnet --out sdk/dotnet/ @@ -42,6 +43,7 @@ build_dotnet: upstream build_go: export PULUMI_HOME := $(WORKING_DIR)/.pulumi build_go: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) +build_go: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache build_go: upstream PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) go --out sdk/go/ cd sdk && go list "$$(grep -e "^module" go.mod | cut -d ' ' -f 2)/go/..." | xargs -I {} bash -c 'go build {} && go clean -i {}' @@ -49,6 +51,7 @@ build_go: upstream build_java: PACKAGE_VERSION := $(shell pulumictl get version --language generic) build_java: export PULUMI_HOME := $(WORKING_DIR)/.pulumi build_java: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) +build_java: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache build_java: bin/pulumi-java-gen upstream $(WORKING_DIR)/bin/$(JAVA_GEN) generate --schema provider/cmd/$(PROVIDER)/schema.json --out sdk/java --build gradle-nexus cd sdk/java/ && \ @@ -58,6 +61,7 @@ build_java: bin/pulumi-java-gen upstream build_nodejs: VERSION := $(shell pulumictl get version --language javascript) build_nodejs: export PULUMI_HOME := $(WORKING_DIR)/.pulumi build_nodejs: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) +build_nodejs: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache build_nodejs: upstream PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) nodejs --out sdk/nodejs/ cd sdk/nodejs/ && \ @@ -70,6 +74,7 @@ build_nodejs: upstream build_python: PYPI_VERSION := $(shell pulumictl get version --language python) build_python: export PULUMI_HOME := $(WORKING_DIR)/.pulumi build_python: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) +build_python: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache build_python: upstream rm -rf sdk/python/ PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) python --out sdk/python/