Skip to content

Commit c4bb553

Browse files
authored
ci: make parallel jobs on arm (#813)
follow-up #809 In this PR, I've found apt-arm executes duplicated binstubs test. Signed-off-by: Kentaro Hayashi <[email protected]>
1 parent a59cb29 commit c4bb553

File tree

4 files changed

+217
-50
lines changed

4 files changed

+217
-50
lines changed

.github/workflows/apt-arm.matrix.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"include": [
3+
{
4+
"label": "Debian bookworm arm64",
5+
"rake-job": "debian-bookworm",
6+
"test-docker-image": "arm64v8/debian:bookworm"
7+
},
8+
{
9+
"label": "Debian trixie arm64",
10+
"rake-job": "debian-trixie",
11+
"test-docker-image": "arm64v8/debian:trixie"
12+
},
13+
{
14+
"label": "Ubuntu Jammy arm64",
15+
"rake-job": "ubuntu-jammy",
16+
"rake-options": "LINTIAN=no",
17+
"test-docker-image": "arm64v8/ubuntu:jammy"
18+
},
19+
{
20+
"label": "Ubuntu Noble arm64",
21+
"rake-job": "ubuntu-noble",
22+
"rake-options": "LINTIAN=no",
23+
"test-docker-image": "arm64v8/ubuntu:noble"
24+
}
25+
]
26+
}

.github/workflows/apt-arm.yml

Lines changed: 90 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,22 @@ concurrency:
99
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
1010
cancel-in-progress: true
1111
jobs:
12+
define-matrix:
13+
runs-on: ubuntu-24.04-arm
14+
outputs:
15+
matrix: ${{ steps.set-matrix.outputs.matrix }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- id: set-matrix
19+
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example-returning-a-json-object
20+
run: echo "matrix=$(cat apt-arm.matrix.json | jq --compact-output)" >> $GITHUB_OUTPUT
21+
working-directory: .github/workflows/
1222
build:
1323
name: Build
24+
needs: define-matrix
1425
strategy:
1526
fail-fast: false
16-
matrix:
17-
label:
18-
- Debian GNU/Linux bookworm arm64
19-
- Debian GNU/Linux trixie arm64
20-
- Ubuntu Jammy arm64
21-
- Ubuntu Noble arm64
22-
include:
23-
- label: Debian GNU/Linux bookworm arm64
24-
rake-job: debian-bookworm
25-
test-docker-image: arm64v8/debian:bookworm
26-
- label: Debian GNU/Linux trixie arm64
27-
rake-job: debian-trixie
28-
test-docker-image: arm64v8/debian:trixie
29-
- label: Ubuntu Jammy arm64
30-
rake-job: ubuntu-jammy
31-
rake-options: LINTIAN=no
32-
test-docker-image: arm64v8/ubuntu:jammy
33-
- label: Ubuntu Noble arm64
34-
rake-job: ubuntu-noble
35-
rake-options: LINTIAN=no
36-
test-docker-image: arm64v8/ubuntu:noble
27+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
3728
runs-on: ubuntu-24.04-arm
3829
steps:
3930
- uses: actions/checkout@v4
@@ -60,9 +51,35 @@ jobs:
6051
with:
6152
name: packages-${{ matrix.rake-job }}-arm64
6253
path: fluent-package/apt/repositories
54+
check_package_size:
55+
name: Check Package Size
56+
runs-on: ubuntu-24.04-arm
57+
needs: [define-matrix, build]
58+
strategy:
59+
fail-fast: false
60+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: actions/download-artifact@v4
64+
with:
65+
name: packages-${{ matrix.rake-job }}-arm64
66+
path: fluent-package/apt/repositories
6367
- name: Check Package Size
6468
run: |
6569
fluent-package/apt/pkgsize-test.sh ${{ matrix.rake-job }} arm64
70+
binstubs_test:
71+
name: Binstubs Test
72+
runs-on: ubuntu-24.04-arm
73+
needs: [define-matrix, build]
74+
strategy:
75+
fail-fast: false
76+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: actions/download-artifact@v4
80+
with:
81+
name: packages-${{ matrix.rake-job }}-arm64
82+
path: fluent-package/apt/repositories
6683
- name: Binstubs Test
6784
run: |
6885
mkdir -p .bundle
@@ -73,6 +90,19 @@ jobs:
7390
--volume ${PWD}:/fluentd:ro \
7491
${{ matrix.test-docker-image }} \
7592
/fluentd/fluent-package/apt/binstubs-test.sh
93+
installation_test:
94+
name: Installation Test
95+
runs-on: ubuntu-24.04-arm
96+
needs: [define-matrix, build]
97+
strategy:
98+
fail-fast: false
99+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
100+
steps:
101+
- uses: actions/checkout@v4
102+
- uses: actions/download-artifact@v4
103+
with:
104+
name: packages-${{ matrix.rake-job }}-arm64
105+
path: fluent-package/apt/repositories
76106
- name: Installation Test
77107
run: |
78108
mkdir -p .bundle
@@ -83,6 +113,19 @@ jobs:
83113
--volume ${PWD}:/fluentd:ro \
84114
${{ matrix.test-docker-image }} \
85115
/fluentd/fluent-package/apt/install-test.sh
116+
piuparts_test:
117+
name: Piuparts Test
118+
runs-on: ubuntu-24.04-arm
119+
needs: [define-matrix, build]
120+
strategy:
121+
fail-fast: false
122+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
123+
steps:
124+
- uses: actions/checkout@v4
125+
- uses: actions/download-artifact@v4
126+
with:
127+
name: packages-${{ matrix.rake-job }}-arm64
128+
path: fluent-package/apt/repositories
86129
- name: Piuparts (Install/Remove/Upgrade) Test
87130
run: |
88131
mkdir -p .bundle
@@ -94,6 +137,19 @@ jobs:
94137
--volume ${PWD}:/fluentd:ro \
95138
${{ matrix.test-docker-image }} \
96139
/fluentd/fluent-package/apt/piuparts-test.sh
140+
serverspec_test:
141+
name: Serverspec Test
142+
runs-on: ubuntu-24.04-arm
143+
needs: [define-matrix, build]
144+
strategy:
145+
fail-fast: false
146+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
147+
steps:
148+
- uses: actions/checkout@v4
149+
- uses: actions/download-artifact@v4
150+
with:
151+
name: packages-${{ matrix.rake-job }}-arm64
152+
path: fluent-package/apt/repositories
97153
- name: Serverspec Test
98154
run: |
99155
mkdir -p .bundle
@@ -104,6 +160,19 @@ jobs:
104160
--volume ${PWD}:/fluentd:ro \
105161
${{ matrix.test-docker-image }} \
106162
/fluentd/fluent-package/apt/serverspec-test.sh
163+
confluent_test:
164+
name: Confluent Test
165+
runs-on: ubuntu-24.04-arm
166+
needs: [define-matrix, build]
167+
strategy:
168+
fail-fast: false
169+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
170+
steps:
171+
- uses: actions/checkout@v4
172+
- uses: actions/download-artifact@v4
173+
with:
174+
name: packages-${{ matrix.rake-job }}-arm64
175+
path: fluent-package/apt/repositories
107176
- name: Confluent Test
108177
run: |
109178
mkdir -p .bundle
@@ -114,13 +183,3 @@ jobs:
114183
--volume ${PWD}:/fluentd:ro \
115184
${{ matrix.test-docker-image }} \
116185
/fluentd/fluent-package/apt/confluent-test.sh
117-
- name: Binstubs Test
118-
run: |
119-
mkdir -p .bundle
120-
docker run \
121-
--rm \
122-
--tty \
123-
--env CI=true \
124-
--volume ${PWD}:/fluentd:ro \
125-
${{ matrix.test-docker-image }} \
126-
/fluentd/fluent-package/apt/binstubs-test.sh

.github/workflows/yum-arm.matrix.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"include": [
3+
{
4+
"label": "RockyLinux 8 aarch64",
5+
"rake-job": "rockylinux-8",
6+
"test-docker-image": "arm64v8/rockylinux:8"
7+
},
8+
{
9+
"label": "AlmaLinux 9 aarch64",
10+
"rake-job": "almalinux-9",
11+
"test-docker-image": "arm64v8/almalinux:9"
12+
},
13+
{
14+
"label": "Amazon Linux 2 aarch64",
15+
"rake-job": "amazonlinux-2",
16+
"test-docker-image": "arm64v8/amazonlinux:2"
17+
},
18+
{
19+
"label": "Amazon Linux 2023 aarch64",
20+
"rake-job": "amazonlinux-2023",
21+
"test-docker-image": "arm64v8/amazonlinux:2023"
22+
}
23+
]
24+
}

.github/workflows/yum-arm.yml

Lines changed: 77 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,22 @@ concurrency:
99
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
1010
cancel-in-progress: true
1111
jobs:
12+
define-matrix:
13+
runs-on: ubuntu-24.04-arm
14+
outputs:
15+
matrix: ${{ steps.set-matrix.outputs.matrix }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- id: set-matrix
19+
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example-returning-a-json-object
20+
run: echo "matrix=$(cat yum-arm.matrix.json | jq --compact-output)" >> $GITHUB_OUTPUT
21+
working-directory: .github/workflows/
1222
build:
1323
name: Build
24+
needs: define-matrix
1425
strategy:
1526
fail-fast: false
16-
matrix:
17-
label:
18-
- RockyLinux 8 aarch64
19-
- AlmaLinux 9 aarch64
20-
- Amazon Linux 2 aarch64
21-
- Amazon Linux 2023 aarch64
22-
include:
23-
- label: RockyLinux 8 aarch64
24-
rake-job: rockylinux-8
25-
test-docker-image: arm64v8/rockylinux:8
26-
- label: AlmaLinux 9 aarch64
27-
rake-job: almalinux-9
28-
test-docker-image: arm64v8/almalinux:9
29-
- label: Amazon Linux 2 aarch64
30-
rake-job: amazonlinux-2
31-
test-docker-image: arm64v8/amazonlinux:2
32-
- label: Amazon Linux 2023 aarch64
33-
rake-job: amazonlinux-2023
34-
test-docker-image: arm64v8/amazonlinux:2023
27+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
3528
runs-on: ubuntu-24.04-arm
3629
steps:
3730
- uses: actions/checkout@v4
@@ -58,9 +51,35 @@ jobs:
5851
with:
5952
name: packages-${{ matrix.rake-job }}-aarch64
6053
path: fluent-package/yum/repositories
54+
check_package_size:
55+
name: Check Package Size
56+
runs-on: ubuntu-24.04-arm
57+
needs: [define-matrix, build]
58+
strategy:
59+
fail-fast: false
60+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: actions/download-artifact@v4
64+
with:
65+
name: packages-${{ matrix.rake-job }}-aarch64
66+
path: fluent-package/yum/repositories
6167
- name: Check Package Size
6268
run: |
6369
fluent-package/yum/pkgsize-test.sh ${{ matrix.rake-job }} aarch64
70+
installation_test:
71+
name: Installation Test
72+
runs-on: ubuntu-24.04-arm
73+
needs: [define-matrix, build]
74+
strategy:
75+
fail-fast: false
76+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: actions/download-artifact@v4
80+
with:
81+
name: packages-${{ matrix.rake-job }}-aarch64
82+
path: fluent-package/yum/repositories
6483
- name: Installation Test
6584
run: |
6685
mkdir -p .bundle
@@ -71,6 +90,19 @@ jobs:
7190
--volume ${PWD}:/fluentd:ro \
7291
${{ matrix.test-docker-image }} \
7392
/fluentd/fluent-package/yum/install-test.sh
93+
serverspec_test:
94+
name: Serverspec Test
95+
runs-on: ubuntu-24.04-arm
96+
needs: [define-matrix, build]
97+
strategy:
98+
fail-fast: false
99+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
100+
steps:
101+
- uses: actions/checkout@v4
102+
- uses: actions/download-artifact@v4
103+
with:
104+
name: packages-${{ matrix.rake-job }}-aarch64
105+
path: fluent-package/yum/repositories
74106
- name: Serverspec Test
75107
run: |
76108
mkdir -p .bundle
@@ -81,6 +113,19 @@ jobs:
81113
--volume ${PWD}:/fluentd:ro \
82114
${{ matrix.test-docker-image }} \
83115
/fluentd/fluent-package/yum/serverspec-test.sh
116+
confluent_test:
117+
name: Confluent Test
118+
runs-on: ubuntu-24.04-arm
119+
needs: [define-matrix, build]
120+
strategy:
121+
fail-fast: false
122+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
123+
steps:
124+
- uses: actions/checkout@v4
125+
- uses: actions/download-artifact@v4
126+
with:
127+
name: packages-${{ matrix.rake-job }}-aarch64
128+
path: fluent-package/yum/repositories
84129
- name: Confluent Test
85130
run: |
86131
mkdir -p .bundle
@@ -91,6 +136,19 @@ jobs:
91136
--volume ${PWD}:/fluentd:ro \
92137
${{ matrix.test-docker-image }} \
93138
/fluentd/fluent-package/yum/confluent-test.sh
139+
binstubs_test:
140+
name: Binstubs Test
141+
runs-on: ubuntu-24.04-arm
142+
needs: [define-matrix, build]
143+
strategy:
144+
fail-fast: false
145+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
146+
steps:
147+
- uses: actions/checkout@v4
148+
- uses: actions/download-artifact@v4
149+
with:
150+
name: packages-${{ matrix.rake-job }}-aarch64
151+
path: fluent-package/yum/repositories
94152
- name: Binstubs Test
95153
run: |
96154
mkdir -p .bundle

0 commit comments

Comments
 (0)