Skip to content

Commit b60acf4

Browse files
committed
ci yum: split v6 and v7 build job
Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
1 parent dc40999 commit b60acf4

2 files changed

Lines changed: 37 additions & 96 deletions

File tree

.github/workflows/yum-arm.yml

Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -24,47 +24,27 @@ jobs:
2424
build:
2525
name: Build
2626
needs: define-matrix
27+
uses: ./.github/workflows/_build_rpm_reusable.yml
2728
strategy:
2829
fail-fast: false
2930
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
30-
runs-on: ubuntu-24.04-arm
31-
steps:
32-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33-
- name: cache rpm
34-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
35-
id: cache-rpm
36-
with:
37-
path: |
38-
fluent-package/yum/repositories
39-
fluent-release/yum/repositories
40-
fluent-lts-release/yum/repositories
41-
key: ${{ runner.os }}-cache-${{ matrix.rake-job }}-aarch64-${{ hashFiles('**/config.rb', '**/Rakefile', '**/Gemfile*', '**/*.spec.in', 'fluent-package/templates/**', 'fluent-package/yum/**/Dockerfile') }}
42-
- uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
43-
with:
44-
ruby-version: '3.4'
45-
- name: Install dependencies
46-
if: ${{ ! steps.cache-rpm.outputs.cache-hit }}
47-
run: |
48-
gem install serverspec --no-document
49-
- name: Build rpm with Docker
50-
if: ${{ ! steps.cache-rpm.outputs.cache-hit }}
51-
run: |
52-
rake yum:build YUM_TARGETS=${{ matrix.rake-job }}-aarch64
53-
- name: Upload fluent-package rpm
54-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
55-
with:
56-
name: packages-${{ matrix.rake-job }}-aarch64
57-
path: fluent-package/yum/repositories
58-
- name: Upload fluent-release rpm
59-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
60-
with:
61-
name: packages-release-${{ matrix.rake-job }}-aarch64
62-
path: fluent-release/yum/repositories
63-
- name: Upload fluent-lts-release rpm
64-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
65-
with:
66-
name: packages-lts-release-${{ matrix.rake-job }}-aarch64
67-
path: fluent-lts-release/yum/repositories
31+
with:
32+
rake-job: ${{ matrix.rake-job }}
33+
runs-on: ubuntu-24.04-arm
34+
next-major: false
35+
cache-group: v6
36+
build-next:
37+
name: Build next major
38+
needs: define-matrix
39+
uses: ./.github/workflows/_build_rpm_reusable.yml
40+
strategy:
41+
fail-fast: false
42+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
43+
with:
44+
rake-job: ${{ matrix.rake-job }}-aarch64
45+
runs-on: ubuntu-24.04-arm
46+
next-major: true
47+
cache-group: v7
6848
check_package_size:
6949
name: Check Package Size
7050
runs-on: ubuntu-24.04-arm

.github/workflows/yum.yml

Lines changed: 19 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -27,66 +27,27 @@ jobs:
2727
build:
2828
needs: define-matrix
2929
name: Build
30-
timeout-minutes: 120
30+
uses: ./.github/workflows/_build_rpm_reusable.yml
3131
strategy:
3232
fail-fast: false
3333
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
37-
- name: cache rpm
38-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
39-
id: cache-rpm
40-
with:
41-
path: |
42-
fluent-package/yum/repositories
43-
fluent-release/yum/repositories
44-
fluent-lts-release/yum/repositories
45-
v7-test/fluent-package/yum/repositories
46-
key: ${{ runner.os }}-cache-${{ matrix.rake-job }}-${{ hashFiles('**/config.rb', '**/Rakefile', '**/Gemfile*', '**/*.spec.in', 'fluent-package/templates/**', 'fluent-package/yum/**/Dockerfile') }}
47-
- uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
48-
with:
49-
ruby-version: '3.4'
50-
- name: Install dependencies
51-
if: ${{ ! steps.cache-rpm.outputs.cache-hit }}
52-
run: |
53-
gem install serverspec --no-document
54-
- name: Build rpm with Docker
55-
if: ${{ ! steps.cache-rpm.outputs.cache-hit }}
56-
run: |
57-
rake yum:build YUM_TARGETS=${{ matrix.rake-job }}
58-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59-
if: ${{ ! steps.cache-rpm.outputs.cache-hit }}
60-
with:
61-
path: v7-test
62-
- name: Build v7 rpm with Docker
63-
if: ${{ ! steps.cache-rpm.outputs.cache-hit }}
64-
run: |
65-
cd v7-test
66-
git config user.email "fluentd@googlegroups.com"
67-
git config user.name "Fluentd developers"
68-
git am fluent-package/bump-version-v7.patch
69-
rake yum:build YUM_TARGETS=${{ matrix.rake-job }}
70-
- name: Upload fluent-package rpm
71-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
72-
with:
73-
name: packages-${{ matrix.rake-job }}
74-
path: fluent-package/yum/repositories
75-
- name: Upload fluent-release rpm
76-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
77-
with:
78-
name: packages-release-${{ matrix.rake-job }}
79-
path: fluent-release/yum/repositories
80-
- name: Upload fluent-lts-release rpm
81-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
82-
with:
83-
name: packages-lts-release-${{ matrix.rake-job }}
84-
path: fluent-lts-release/yum/repositories
85-
- name: Upload v7 fluent-package rpm
86-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
87-
with:
88-
name: v7-packages-${{ matrix.rake-job }}
89-
path: v7-test/fluent-package/yum/repositories
34+
with:
35+
rake-job: ${{ matrix.rake-job }}
36+
runs-on: ubuntu-latest
37+
next-major: false
38+
cache-group: v6
39+
build-next:
40+
needs: define-matrix
41+
name: Build next major
42+
uses: ./.github/workflows/_build_rpm_reusable.yml
43+
strategy:
44+
fail-fast: false
45+
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
46+
with:
47+
rake-job: ${{ matrix.rake-job }}
48+
runs-on: ubuntu-latest
49+
next-major: true
50+
cache-group: v7
9051
check_package_size:
9152
name: Check Package Size
9253
runs-on: ubuntu-latest
@@ -255,7 +216,7 @@ jobs:
255216

256217
v2test:
257218
name: Test ${{ matrix.label }} ${{ matrix.test }} (CGroup V2)
258-
needs: [define-matrix, check_package_size, installation_test, serverspec_test, binstubs_test]
219+
needs: [define-matrix, check_package_size, installation_test, serverspec_test, binstubs_test, build-next]
259220
runs-on: ubuntu-latest
260221
timeout-minutes: 15
261222
strategy:

0 commit comments

Comments
 (0)