Skip to content

Commit b782cf6

Browse files
committed
Run on large CodeBuild runners to deal with disk space issue
1 parent d76758f commit b782cf6

File tree

3 files changed

+20
-119
lines changed

3 files changed

+20
-119
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GitHub Action Workflow for building a new commit to the primary repo branch and publishing a new release to beta.
22
#
3-
# Workflow is triggered on pushes into master.
3+
# Workflow is triggered on pushes. Beta publish job runs conditionally if pushed to master.
44
#
55
# Additional Docs:
66
# - GitHub Actions: https://help.github.com/en/actions
@@ -10,90 +10,36 @@ on:
1010
push:
1111
paths-ignore:
1212
- '*.md'
13-
branches:
14-
- master
1513
jobs:
1614

1715
# Build and test plugin and provide artifact.
1816
build:
1917
name: Build
20-
runs-on: ubuntu-latest
18+
runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
2119
steps:
22-
23-
- run: df
24-
25-
# Check out current repository
26-
- name: Fetch Sources
27-
uses: actions/checkout@v2
28-
29-
- name: Setup JDK
30-
uses: actions/setup-java@v3
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-java@v3
3122
with:
3223
distribution: 'corretto'
3324
java-version: '17'
34-
35-
- run: df
3625
- uses: gradle/actions/setup-gradle@v4
3726

38-
- run: df
27+
# Build artifact using build Gradle task
28+
- name: Build
29+
run: ./gradlew build
30+
3931
# Build artifact using buildPlugin Gradle task
4032
- name: Build Plugin
4133
run: ./gradlew buildPlugin
4234

43-
- run: df
44-
- name: Get Product Versions
45-
id: get-products
46-
run: |
47-
PRODUCTS="$(./gradlew printProductsReleases -q | jq -cnR '[inputs | select(length > 0)]')"
48-
echo "products=$PRODUCTS"
49-
echo "products=$PRODUCTS" >> "$GITHUB_OUTPUT"
50-
51-
outputs:
52-
products: ${{ steps.get-products.outputs.products }}
53-
54-
verify:
55-
runs-on: ubuntu-latest
56-
needs: build
57-
strategy:
58-
fail-fast: false
59-
matrix:
60-
product: ${{ fromJSON(needs.build.outputs.products) }}
61-
steps:
62-
- run: df
63-
- uses: actions/checkout@v4
64-
- run: df
65-
- uses: actions/setup-java@v3
66-
with:
67-
distribution: 'corretto'
68-
java-version: '17'
69-
- run: df
70-
71-
# Cache Gradle dependencies
72-
- name: Setup Gradle Dependencies Cache
73-
uses: actions/cache@v2
74-
with:
75-
path: ~/.gradle/caches
76-
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
77-
78-
# Cache Gradle Wrapper
79-
- name: Setup Gradle Wrapper Cache
80-
uses: actions/cache@v2
81-
with:
82-
path: ~/.gradle/wrapper
83-
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
84-
85-
- run: df
86-
87-
# Don't set up gradle here. We've already verified the gradle wrapper in the previous job.
88-
8935
# Run intellij:verifyPlugin task.
9036
- name: Verify Plugin
91-
run: ./gradlew verifyPlugin -PverifyPlugin="${{ matrix.product }}"
37+
run: ./gradlew verifyPlugin
9238

9339
publish-beta:
94-
needs: verify
95-
runs-on: ubuntu-latest
96-
if: github.repository == 'amazon-ion/ion-intellij-plugin'
40+
needs: build
41+
if: github.repository == 'amazon-ion/ion-intellij-plugin' && github.ref == 'refs/heads/master'
42+
runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
9743
steps:
9844
- uses: actions/checkout@v4
9945
- uses: actions/setup-java@v3
@@ -107,11 +53,3 @@ jobs:
10753
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
10854
PUBLISH_CHANNEL: beta
10955
run: ./gradlew --stacktrace publishPlugin
110-
111-
# Upload plugin artifact to make it available in the next jobs
112-
- name: Upload artifact
113-
if: github.repository == 'amazon-ion/ion-intellij-plugin'
114-
uses: actions/upload-artifact@v4
115-
with:
116-
name: plugin-artifact
117-
path: ./build/distributions/

.github/workflows/pr.yml

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,14 @@ jobs:
1616
# Build and test plugin and provide artifact.
1717
build:
1818
name: Build
19-
runs-on: ubuntu-latest
19+
runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
2020
steps:
21-
22-
# Check out current repository
23-
- name: Fetch Sources
24-
uses: actions/checkout@v2
25-
26-
- name: Setup JDK
27-
uses: actions/setup-java@v3
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-java@v3
2823
with:
2924
distribution: 'corretto'
3025
java-version: '17'
31-
3226
- uses: gradle/actions/setup-gradle@v4
33-
with:
34-
cache-disabled: true
3527

3628
# Build artifact using build Gradle task
3729
- name: Build
@@ -41,33 +33,6 @@ jobs:
4133
- name: Build Plugin
4234
run: ./gradlew buildPlugin
4335

44-
- name: Get Product Versions
45-
id: get-products
46-
run: |
47-
PRODUCTS="$(./gradlew printProductsReleases -q | jq -cnR '[inputs | select(length > 0)]')"
48-
echo "products=$PRODUCTS"
49-
echo "products=$PRODUCTS" >> "$GITHUB_OUTPUT"
50-
51-
outputs:
52-
products: ${{ steps.get-products.outputs.products }}
53-
54-
verify:
55-
runs-on: ubuntu-latest
56-
needs: build
57-
strategy:
58-
fail-fast: false
59-
matrix:
60-
product: ${{ fromJSON(needs.build.outputs.products) }}
61-
steps:
62-
- uses: actions/checkout@v4
63-
- uses: actions/setup-java@v3
64-
with:
65-
distribution: 'corretto'
66-
java-version: '17'
67-
- uses: gradle/actions/setup-gradle@v4
68-
with:
69-
cache-read-only: true
70-
7136
# Run intellij:verifyPlugin task.
7237
- name: Verify Plugin
73-
run: ./gradlew verifyPlugin -PverifyPlugin="${{ matrix.product }}"
38+
run: ./gradlew verifyPlugin

.github/workflows/release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GitHub Action Workflow for releasing a new stable version of the plugin.
22
#
3-
# Workflow is triggered manually w/ proper access.
3+
# Workflow is triggered when a new release is published.
44
#
55
# Additional Docs:
66
# - GitHub Actions: https://help.github.com/en/actions
@@ -16,11 +16,10 @@ env:
1616

1717
jobs:
1818
release:
19-
runs-on: ubuntu-latest
19+
runs-on: codebuild-ion-intellij-plugin-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
2020
steps:
2121
# Check out current repository
22-
- name: Fetch Sources
23-
uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2423

2524
# Generate resources/plugin-changenotes.html
2625
- name: Generate Changenotes
@@ -34,8 +33,7 @@ jobs:
3433
- name: Log Changenotes Content
3534
run: cat resources/plugin-changenotes.html
3635

37-
- name: Setup JDK
38-
uses: actions/setup-java@v3
36+
- uses: actions/setup-java@v3
3937
with:
4038
distribution: 'corretto'
4139
java-version: '17'

0 commit comments

Comments
 (0)