Skip to content

Commit

Permalink
Only run disk cleaner for ubuntu/linux runners (#848)
Browse files Browse the repository at this point in the history
Fixes: #847
  • Loading branch information
rquitales authored Mar 14, 2024
1 parent 45d2820 commit b69a652
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Clear GitHub Actions Ubuntu runner disk space
uses: jlumbroso/[email protected]
with:
tool-cache: false
dotnet: false
android: true
haskell: true
swap-storage: true
large-packages: false
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Clear GitHub Actions Ubuntu runner disk space
uses: jlumbroso/[email protected]
with:
tool-cache: false
dotnet: false
android: true
haskell: true
swap-storage: true
large-packages: false
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Clear GitHub Actions Ubuntu runner disk space
uses: jlumbroso/[email protected]
with:
tool-cache: false
dotnet: false
android: true
haskell: true
swap-storage: true
large-packages: false
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Clear GitHub Actions Ubuntu runner disk space
uses: jlumbroso/[email protected]
with:
tool-cache: false
dotnet: false
android: true
haskell: true
swap-storage: true
large-packages: false
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Clear GitHub Actions Ubuntu runner disk space
uses: jlumbroso/[email protected]
with:
tool-cache: false
dotnet: false
android: true
haskell: true
swap-storage: true
large-packages: false
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Clear GitHub Actions Ubuntu runner disk space
uses: jlumbroso/[email protected]
with:
tool-cache: false
dotnet: false
android: true
haskell: true
swap-storage: true
large-packages: false
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand Down
7 changes: 6 additions & 1 deletion native-provider-ci/src/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,12 @@ export function Codecov(): Step {
};
}

export function FreeDiskSpace(): Step {
export function FreeDiskSpace(runner: string): Step {
if (!runner.includes("ubuntu")) {
// This step is only relevant for the Ubuntu runner.
return {};
}

return {
name: "Clear GitHub Actions Ubuntu runner disk space",
uses: action.freeDiskSpace,
Expand Down
8 changes: 4 additions & 4 deletions native-provider-ci/src/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ export class PublishPrereleaseJob implements NormalJob {
steps.CheckoutRepoStep(),
steps.CheckoutTagsStep(),
steps.InstallGo(),
steps.FreeDiskSpace(),
steps.FreeDiskSpace(this["runs-on"]),
steps.InstallPulumiCtl(),
steps.InstallPulumiCli(opts.pulumiCLIVersion),
steps.ConfigureAwsCredentialsForPublish(),
Expand All @@ -761,7 +761,7 @@ export class PublishPrereleaseJob implements NormalJob {
`-p ${opts.parallel} -f .goreleaser.prerelease.yml --clean --skip=validate --timeout ${opts.timeout}m0s`
),
steps.NotifySlack("Failure in publishing binaries"),
];
].filter((step: Step) => step.uses !== undefined || step.run !== undefined);
Object.assign(this, { name });
}
}
Expand All @@ -782,7 +782,7 @@ export class PublishJob implements NormalJob {
steps.CheckoutRepoStep(),
steps.CheckoutTagsStep(),
steps.InstallGo(),
steps.FreeDiskSpace(),
steps.FreeDiskSpace(this["runs-on"]),
steps.InstallPulumiCtl(),
steps.InstallPulumiCli(opts.pulumiCLIVersion),
steps.ConfigureAwsCredentialsForPublish(),
Expand All @@ -791,7 +791,7 @@ export class PublishJob implements NormalJob {
`-p ${opts.parallel} release --clean --timeout ${opts.timeout}m0s`
),
steps.NotifySlack("Failure in publishing binaries"),
];
].filter((step: Step) => step.uses !== undefined || step.run !== undefined);
}
}

Expand Down

0 comments on commit b69a652

Please sign in to comment.