From d67112f4fb3212da59d0860adca526983d24c922 Mon Sep 17 00:00:00 2001 From: Gugle Date: Tue, 23 Jun 2026 07:54:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor(ci):=20=E9=87=8D=E6=9E=84CI?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E4=BB=A5=E6=94=AF=E6=8C=81=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=8C=96=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 引入generate-matrix.js脚本自动生成构建矩阵 - 添加modules.json文件管理模块依赖关系 - 实现基于拓扑排序的分层构建(l0/l1/l2) - 集成Roseau API检查到PR工作流 - 移除原有的单一模块工作流配置 - 优化发布工作流中的部署流程 --- .github/modules.json | 19 ++ .github/workflows/ci.yml | 435 +++++---------------------- .github/workflows/generate-matrix.js | 57 ++++ .github/workflows/pull_request.yml | 321 +++++--------------- .github/workflows/release.yml | 433 ++++---------------------- .github/workflows/roseau_comment.yml | 60 ++-- 6 files changed, 298 insertions(+), 1027 deletions(-) create mode 100644 .github/modules.json create mode 100644 .github/workflows/generate-matrix.js diff --git a/.github/modules.json b/.github/modules.json new file mode 100644 index 00000000..4dd3c8e5 --- /dev/null +++ b/.github/modules.json @@ -0,0 +1,19 @@ +[ + { "module": "codec", "needs": [] }, + { "module": "collision", "needs": [] }, + { "module": "config", "needs": [] }, + { "module": "integration", "needs": [] }, + { "module": "moveable-entity-block", "needs": [] }, + { "module": "network", "needs": [] }, + { "module": "rendering", "needs": [] }, + { "module": "space-select", "needs": [] }, + + { "module": "font", "needs": ["rendering"] }, + { "module": "util", "needs": ["codec"] }, + + { "module": "multiblock", "needs": ["codec", "config", "network", "util"] }, + { "module": "recipe", "needs": ["codec", "config", "util"] }, + { "module": "registrum", "needs": ["util"] }, + { "module": "sync", "needs": ["codec", "network", "util"] }, + { "module": "wheel", "needs": ["rendering", "util"] } +] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b41bf6c4..a4877f5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,12 @@ on: push: branches: - dev/** - # - releases/** paths: + - .github/modules.json - .github/workflows/build_and_test.yml - .github/workflows/publish_maven_central.yml - .github/workflows/ci.yml + - .github/workflows/generate-matrix.js - gradle/** - module.*/src/** - module.*/build.gradle @@ -19,420 +20,118 @@ on: - settings.gradle jobs: - codec: - uses: ./.github/workflows/build_and_test.yml - with: - module: codec - module_id: anvillib-codec - mod_id: anvillib_codec - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - codec-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - codec - with: - module: codec - module_id: anvillib-codec - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - collision: - uses: ./.github/workflows/build_and_test.yml - with: - module: collision - module_id: anvillib-collision - mod_id: anvillib_collision - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - collision-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - collision - with: - module: collision - module_id: anvillib-collision - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - config: - uses: ./.github/workflows/build_and_test.yml - with: - module: config - module_id: anvillib-config - mod_id: anvillib_config - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - config-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - config - with: - module: config - module_id: anvillib-config - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - font: - needs: - - rendering - uses: ./.github/workflows/build_and_test.yml - with: - module: font - module_id: anvillib-font - mod_id: anvillib_font - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - font-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - font - with: - module: font - module_id: anvillib-font - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - integration: - uses: ./.github/workflows/build_and_test.yml - with: - module: integration - module_id: anvillib-integration - mod_id: anvillib_integration - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - integration-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - integration - with: - module: integration - module_id: anvillib-integration - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - moveable-entity-block: - uses: ./.github/workflows/build_and_test.yml - with: - module: moveable-entity-block - module_id: anvillib-moveable-entity-block - mod_id: anvillib_moveable_entity_block - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - moveable-entity-block-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - moveable-entity-block - with: - module: moveable-entity-block - module_id: anvillib-moveable-entity-block - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - multiblock: - uses: ./.github/workflows/build_and_test.yml - needs: - - codec - - config - - network - - util - with: - module: multiblock - module_id: anvillib-multiblock - mod_id: anvillib_multiblock - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - multiblock-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - multiblock - with: - module: multiblock - module_id: anvillib-multiblock - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - network: - uses: ./.github/workflows/build_and_test.yml - with: - module: network - module_id: anvillib-network - mod_id: anvillib_network - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - network-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - network - with: - module: network - module_id: anvillib-network - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - recipe: - needs: - - codec - - config - - util - uses: ./.github/workflows/build_and_test.yml - with: - module: recipe - module_id: anvillib-recipe - mod_id: anvillib_recipe - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - recipe-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - recipe - with: - module: recipe - module_id: anvillib-recipe - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - registrum: - uses: ./.github/workflows/build_and_test.yml - needs: - - util - with: - module: registrum - module_id: anvillib-registrum - mod_id: anvillib_registrum - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - registrum-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - registrum - with: - module: registrum - module_id: anvillib-registrum - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - rendering: + prepare: + runs-on: ubuntu-latest + outputs: + level_0: ${{ steps.matrix.outputs.level_0 }} + level_1: ${{ steps.matrix.outputs.level_1 }} + level_2: ${{ steps.matrix.outputs.level_2 }} + steps: + - uses: actions/checkout@v6 + - id: matrix + run: node .github/workflows/generate-matrix.js + + # ── Build (topological levels) ────────────────────────────────── + + build-l0: + needs: [prepare] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_0) }} uses: ./.github/workflows/build_and_test.yml with: - module: rendering - module_id: anvillib-rendering - mod_id: anvillib_rendering + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} + mod_id: ${{ matrix.mod_id }} ci_build: true pr_build: false secrets: maven_url: ${{ secrets.MAVEN_URL }} maven_user: ${{ secrets.MAVEN_USER }} maven_pass: ${{ secrets.MAVEN_PASS }} - rendering-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - rendering - with: - module: rendering - module_id: anvillib-rendering - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - space-select: + + build-l1: + needs: [build-l0] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/build_and_test.yml with: - module: space-select - module_id: anvillib-space-select - mod_id: anvillib_space_select + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} + mod_id: ${{ matrix.mod_id }} ci_build: true pr_build: false secrets: maven_url: ${{ secrets.MAVEN_URL }} maven_user: ${{ secrets.MAVEN_USER }} maven_pass: ${{ secrets.MAVEN_PASS }} - space-select-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - space-select - with: - module: space-select - module_id: anvillib-space-select - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - sync: + + build-l2: + needs: [build-l1] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/build_and_test.yml - needs: - - codec - - network - - util with: - module: sync - module_id: anvillib-sync - mod_id: anvillib_sync + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} + mod_id: ${{ matrix.mod_id }} ci_build: true pr_build: false secrets: maven_url: ${{ secrets.MAVEN_URL }} maven_user: ${{ secrets.MAVEN_USER }} maven_pass: ${{ secrets.MAVEN_PASS }} - sync-maven-central-deploy: + + # ── Maven Central deploy ──────────────────────────────────────── + + deploy-l0: + needs: [build-l0] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_0) }} uses: ./.github/workflows/publish_maven_central.yml - needs: - - sync with: - module: sync - module_id: anvillib-sync + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} secrets: maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} signing_key: ${{ secrets.SIGNING_KEY }} signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} signing_password: ${{ secrets.SIGNING_PASSWORD }} - util: - uses: ./.github/workflows/build_and_test.yml - needs: - - codec - with: - module: util - module_id: anvillib-util - mod_id: anvillib_util - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - util-maven-central-deploy: + + deploy-l1: + needs: [build-l1] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/publish_maven_central.yml - needs: - - util with: - module: util - module_id: anvillib-util + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} secrets: maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} signing_key: ${{ secrets.SIGNING_KEY }} signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} signing_password: ${{ secrets.SIGNING_PASSWORD }} - wheel: - uses: ./.github/workflows/build_and_test.yml - needs: - - rendering - - util - with: - module: wheel - module_id: anvillib-wheel - mod_id: anvillib_wheel - ci_build: true - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - wheel-maven-central-deploy: + + deploy-l2: + needs: [build-l2] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/publish_maven_central.yml - needs: - - wheel with: - module: wheel - module_id: anvillib-wheel + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} secrets: maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} signing_key: ${{ secrets.SIGNING_KEY }} signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} signing_password: ${{ secrets.SIGNING_PASSWORD }} + + # ── Main (aggregator) ─────────────────────────────────────────── + main: - needs: - - codec - - collision - - config - - font - - integration - - moveable-entity-block - - multiblock - - network - - recipe - - registrum - - rendering - - space-select - - sync - - util - - wheel + needs: [build-l2] uses: ./.github/workflows/build_and_test.yml with: module: main @@ -447,10 +146,10 @@ jobs: maven_pass: ${{ secrets.MAVEN_PASS }} curseforge_token: ${{ secrets.CURSEFORGE_TOKEN }} modrinth_token: ${{ secrets.MODRINTH_TOKEN }} + main-maven-central-deploy: + needs: [main] uses: ./.github/workflows/publish_maven_central.yml - needs: - - main with: module: main module_id: anvillib diff --git a/.github/workflows/generate-matrix.js b/.github/workflows/generate-matrix.js new file mode 100644 index 00000000..603ba88b --- /dev/null +++ b/.github/workflows/generate-matrix.js @@ -0,0 +1,57 @@ +const fs = require('fs'); +const path = require('path'); + +const modulesPath = path.join(process.env.GITHUB_WORKSPACE, '.github', 'modules.json'); +const modules = JSON.parse(fs.readFileSync(modulesPath, 'utf8')); + +// Derive IDs from module name +const all = modules.map(m => ({ + module: m.module, + module_id: `anvillib-${m.module}`, + mod_id: `anvillib_${m.module.replace(/-/g, '_')}`, + needs: m.needs || [] +})); + +// ── Topological sort (Kahn's algorithm) ────────────────────────── +const deps = new Map(all.map(m => [m.module, m.needs])); +const inDegree = new Map(all.map(m => [m.module, m.needs.length])); +const queue = all.filter(m => inDegree.get(m.module) === 0).map(m => m.module); +const levels = []; + +while (queue.length > 0) { + const size = queue.length; + const current = []; + for (let i = 0; i < size; i++) { + const name = queue.shift(); + current.push(name); + for (const m of all) { + if (m.needs.includes(name)) { + const deg = inDegree.get(m.module) - 1; + inDegree.set(m.module, deg); + if (deg === 0) queue.push(m.module); + } + } + } + levels.push(current); +} + +// ── Outputs ────────────────────────────────────────────────────── +const out = process.env.GITHUB_OUTPUT; + +levels.forEach((names, i) => { + const entries = all.filter(m => names.includes(m.module)); + const matrix = JSON.stringify({ + include: entries.map(m => ({ + module: m.module, + module_id: m.module_id, + mod_id: m.mod_id + })) + }); + fs.appendFileSync(out, `level_${i}=${matrix}\n`); +}); + +fs.appendFileSync(out, `level_count=${levels.length}\n`); + +// Flat list for roseau_comment.yml +const names = JSON.stringify(all.map(m => m.module)); +fs.appendFileSync(out, `module_names=${names}\n`); diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a8a1637c..d072ef17 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,10 +4,12 @@ on: pull_request: branches: - dev/** - # - releases/** paths: + - .github/modules.json - .github/workflows/build_and_test.yml - .github/workflows/pull_request.yml + - .github/workflows/roseau_check.yml + - .github/workflows/generate-matrix.js - gradle/** - module.*/src/** - module.*/build.gradle @@ -22,284 +24,101 @@ permissions: actions: read packages: read pull-requests: write + jobs: - codec: - uses: ./.github/workflows/build_and_test.yml - with: - module: codec - module_id: anvillib-codec - mod_id: anvillib_codec - ci_build: true - pr_build: true - collision: - uses: ./.github/workflows/build_and_test.yml - with: - module: collision - module_id: anvillib-collision - mod_id: anvillib_collision - ci_build: true - pr_build: true - config: - uses: ./.github/workflows/build_and_test.yml - with: - module: config - module_id: anvillib-config - mod_id: anvillib_config - ci_build: true - pr_build: true - font: - needs: - - rendering - uses: ./.github/workflows/build_and_test.yml - with: - module: font - module_id: anvillib-font - mod_id: anvillib_font - ci_build: true - pr_build: true - integration: - uses: ./.github/workflows/build_and_test.yml - with: - module: integration - module_id: anvillib-integration - mod_id: anvillib_integration - ci_build: true - pr_build: true - moveable-entity-block: - uses: ./.github/workflows/build_and_test.yml - with: - module: moveable-entity-block - module_id: anvillib-moveable-entity-block - mod_id: anvillib_moveable_entity_block - ci_build: true - pr_build: true - multiblock: - uses: ./.github/workflows/build_and_test.yml - needs: - - codec - - config - - network - - util - with: - module: multiblock - module_id: anvillib-multiblock - mod_id: anvillib_multiblock - ci_build: true - pr_build: true - network: - uses: ./.github/workflows/build_and_test.yml - with: - module: network - module_id: anvillib-network - mod_id: anvillib_network - ci_build: true - pr_build: true - recipe: - needs: - - codec - - config - - util - uses: ./.github/workflows/build_and_test.yml - with: - module: recipe - module_id: anvillib-recipe - mod_id: anvillib_recipe - ci_build: true - pr_build: true - registrum: - uses: ./.github/workflows/build_and_test.yml - needs: - - util - with: - module: registrum - module_id: anvillib-registrum - mod_id: anvillib_registrum - ci_build: true - pr_build: true - rendering: - uses: ./.github/workflows/build_and_test.yml - with: - module: rendering - module_id: anvillib-rendering - mod_id: anvillib_rendering - ci_build: true - pr_build: true - space-select: - uses: ./.github/workflows/build_and_test.yml - with: - module: space-select - module_id: anvillib-space-select - mod_id: anvillib_space_select - ci_build: true - pr_build: true - sync: - uses: ./.github/workflows/build_and_test.yml - needs: - - codec - - network - - util - with: - module: sync - module_id: anvillib-sync - mod_id: anvillib_sync - ci_build: true - pr_build: true - util: + prepare: + runs-on: ubuntu-latest + outputs: + level_0: ${{ steps.matrix.outputs.level_0 }} + level_1: ${{ steps.matrix.outputs.level_1 }} + level_2: ${{ steps.matrix.outputs.level_2 }} + steps: + - uses: actions/checkout@v6 + - id: matrix + run: node .github/workflows/generate-matrix.js + + # ── Build (topological levels) ────────────────────────────────── + + build-l0: + needs: [prepare] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_0) }} uses: ./.github/workflows/build_and_test.yml - needs: - - codec with: - module: util - module_id: anvillib-util - mod_id: anvillib_util + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} + mod_id: ${{ matrix.mod_id }} ci_build: true pr_build: true - wheel: + + build-l1: + needs: [build-l0] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/build_and_test.yml - needs: - - rendering - - util with: - module: wheel - module_id: anvillib-wheel - mod_id: anvillib_wheel + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} + mod_id: ${{ matrix.mod_id }} ci_build: true pr_build: true - main: - needs: - - codec - - collision - - config - - font - - integration - - moveable-entity-block - - multiblock - - network - - recipe - - registrum - - rendering - - space-select - - sync - - util - - wheel + + build-l2: + needs: [build-l1] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/build_and_test.yml with: - module: main - module_id: anvillib - mod_id: anvillib + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} + mod_id: ${{ matrix.mod_id }} ci_build: true pr_build: true - gametest: true - - # ── Roseau API checks ────────────────────────────────────────── - - codec-roseau: - needs: codec - uses: ./.github/workflows/roseau_check.yml - with: - module: codec - module_id: anvillib-codec - collision-roseau: - needs: collision - uses: ./.github/workflows/roseau_check.yml - with: - module: collision - module_id: anvillib-collision + # ── Roseau API checks ─────────────────────────────────────────── - config-roseau: - needs: config + roseau-l0: + needs: [build-l0] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_0) }} uses: ./.github/workflows/roseau_check.yml with: - module: config - module_id: anvillib-config + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} - font-roseau: - needs: font + roseau-l1: + needs: [build-l1] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/roseau_check.yml with: - module: font - module_id: anvillib-font + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} - integration-roseau: - needs: integration + roseau-l2: + needs: [build-l2] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/roseau_check.yml with: - module: integration - module_id: anvillib-integration + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} - moveable-entity-block-roseau: - needs: moveable-entity-block - uses: ./.github/workflows/roseau_check.yml - with: - module: moveable-entity-block - module_id: anvillib-moveable-entity-block + # ── Main (aggregator) ─────────────────────────────────────────── - multiblock-roseau: - needs: multiblock - uses: ./.github/workflows/roseau_check.yml - with: - module: multiblock - module_id: anvillib-multiblock - - network-roseau: - needs: network - uses: ./.github/workflows/roseau_check.yml - with: - module: network - module_id: anvillib-network - - recipe-roseau: - needs: recipe - uses: ./.github/workflows/roseau_check.yml - with: - module: recipe - module_id: anvillib-recipe - - registrum-roseau: - needs: registrum - uses: ./.github/workflows/roseau_check.yml - with: - module: registrum - module_id: anvillib-registrum - - rendering-roseau: - needs: rendering - uses: ./.github/workflows/roseau_check.yml - with: - module: rendering - module_id: anvillib-rendering - - space-select-roseau: - needs: space-select - uses: ./.github/workflows/roseau_check.yml - with: - module: space-select - module_id: anvillib-space-select - - sync-roseau: - needs: sync - uses: ./.github/workflows/roseau_check.yml - with: - module: sync - module_id: anvillib-sync - - util-roseau: - needs: util - uses: ./.github/workflows/roseau_check.yml - with: - module: util - module_id: anvillib-util - - wheel-roseau: - needs: wheel - uses: ./.github/workflows/roseau_check.yml + main: + needs: [build-l2] + uses: ./.github/workflows/build_and_test.yml with: - module: wheel - module_id: anvillib-wheel + module: main + module_id: anvillib + mod_id: anvillib + ci_build: true + pr_build: true + gametest: true main-roseau: - needs: main + needs: [main] uses: ./.github/workflows/roseau_check.yml with: module: main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a474b3da..fa27b7f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,423 +5,120 @@ on: - published branches: - dev/** - # - releases/** jobs: - codec: - uses: ./.github/workflows/build_and_test.yml - with: - module: codec - module_id: anvillib-codec - mod_id: anvillib_codec - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - codec-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - codec - with: - module: codec - module_id: anvillib-codec - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - collision: - uses: ./.github/workflows/build_and_test.yml - with: - module: collision - module_id: anvillib-collision - mod_id: anvillib_collision - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - collision-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - collision - with: - module: collision - module_id: anvillib-collision - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - config: - uses: ./.github/workflows/build_and_test.yml - with: - module: config - module_id: anvillib-config - mod_id: anvillib_config - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - config-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - config - with: - module: config - module_id: anvillib-config - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - font: - needs: - - rendering - uses: ./.github/workflows/build_and_test.yml - with: - module: font - module_id: anvillib-font - mod_id: anvillib_font - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - font-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - font - with: - module: font - module_id: anvillib-font - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - integration: - uses: ./.github/workflows/build_and_test.yml - with: - module: integration - module_id: anvillib-integration - mod_id: anvillib_integration - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - integration-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - integration - with: - module: integration - module_id: anvillib-integration - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - moveable-entity-block: - uses: ./.github/workflows/build_and_test.yml - with: - module: moveable-entity-block - module_id: anvillib-moveable-entity-block - mod_id: anvillib_moveable_entity_block - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - moveable-entity-block-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - moveable-entity-block - with: - module: moveable-entity-block - module_id: anvillib-moveable-entity-block - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - multiblock: - uses: ./.github/workflows/build_and_test.yml - needs: - - codec - - config - - network - - util - with: - module: multiblock - module_id: anvillib-multiblock - mod_id: anvillib_multiblock - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - multiblock-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - multiblock - with: - module: multiblock - module_id: anvillib-multiblock - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - network: - uses: ./.github/workflows/build_and_test.yml - with: - module: network - module_id: anvillib-network - mod_id: anvillib_network - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - network-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - network - with: - module: network - module_id: anvillib-network - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - recipe: - needs: - - codec - - config - - util - uses: ./.github/workflows/build_and_test.yml - with: - module: recipe - module_id: anvillib-recipe - mod_id: anvillib_recipe - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - recipe-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - recipe - with: - module: recipe - module_id: anvillib-recipe - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - registrum: - uses: ./.github/workflows/build_and_test.yml - needs: - - util - with: - module: registrum - module_id: anvillib-registrum - mod_id: anvillib_registrum - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - registrum-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - registrum - with: - module: registrum - module_id: anvillib-registrum - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - rendering: + prepare: + runs-on: ubuntu-latest + outputs: + level_0: ${{ steps.matrix.outputs.level_0 }} + level_1: ${{ steps.matrix.outputs.level_1 }} + level_2: ${{ steps.matrix.outputs.level_2 }} + steps: + - uses: actions/checkout@v6 + - id: matrix + run: node .github/workflows/generate-matrix.js + + # ── Build (topological levels) ────────────────────────────────── + + build-l0: + needs: [prepare] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_0) }} uses: ./.github/workflows/build_and_test.yml with: - module: rendering - module_id: anvillib-rendering - mod_id: anvillib_rendering + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} + mod_id: ${{ matrix.mod_id }} ci_build: false pr_build: false secrets: maven_url: ${{ secrets.MAVEN_URL }} maven_user: ${{ secrets.MAVEN_USER }} maven_pass: ${{ secrets.MAVEN_PASS }} - rendering-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - rendering - with: - module: rendering - module_id: anvillib-rendering - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - space-select: + + build-l1: + needs: [build-l0] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/build_and_test.yml with: - module: space-select - module_id: anvillib-space-select - mod_id: anvillib_space_select + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} + mod_id: ${{ matrix.mod_id }} ci_build: false pr_build: false secrets: maven_url: ${{ secrets.MAVEN_URL }} maven_user: ${{ secrets.MAVEN_USER }} maven_pass: ${{ secrets.MAVEN_PASS }} - space-select-maven-central-deploy: - uses: ./.github/workflows/publish_maven_central.yml - needs: - - space-select - with: - module: space-select - module_id: anvillib-space-select - secrets: - maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing_key: ${{ secrets.SIGNING_KEY }} - signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} - signing_password: ${{ secrets.SIGNING_PASSWORD }} - sync: + + build-l2: + needs: [build-l1] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/build_and_test.yml - needs: - - codec - - network - - util with: - module: sync - module_id: anvillib-sync - mod_id: anvillib_sync + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} + mod_id: ${{ matrix.mod_id }} ci_build: false pr_build: false secrets: maven_url: ${{ secrets.MAVEN_URL }} maven_user: ${{ secrets.MAVEN_USER }} maven_pass: ${{ secrets.MAVEN_PASS }} - sync-maven-central-deploy: + + # ── Maven Central deploy ──────────────────────────────────────── + + deploy-l0: + needs: [build-l0] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_0) }} uses: ./.github/workflows/publish_maven_central.yml - needs: - - sync with: - module: sync - module_id: anvillib-sync + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} secrets: maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} signing_key: ${{ secrets.SIGNING_KEY }} signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} signing_password: ${{ secrets.SIGNING_PASSWORD }} - util: - uses: ./.github/workflows/build_and_test.yml - needs: - - codec - with: - module: util - module_id: anvillib-util - mod_id: anvillib_util - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - util-maven-central-deploy: + + deploy-l1: + needs: [build-l1] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/publish_maven_central.yml - needs: - - util with: - module: util - module_id: anvillib-util + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} secrets: maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} signing_key: ${{ secrets.SIGNING_KEY }} signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} signing_password: ${{ secrets.SIGNING_PASSWORD }} - wheel: - uses: ./.github/workflows/build_and_test.yml - needs: - - rendering - - util - with: - module: wheel - module_id: anvillib-wheel - mod_id: anvillib_wheel - ci_build: false - pr_build: false - secrets: - maven_url: ${{ secrets.MAVEN_URL }} - maven_user: ${{ secrets.MAVEN_USER }} - maven_pass: ${{ secrets.MAVEN_PASS }} - wheel-maven-central-deploy: + + deploy-l2: + needs: [build-l2] + strategy: + matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/publish_maven_central.yml - needs: - - wheel with: - module: wheel - module_id: anvillib-wheel + module: ${{ matrix.module }} + module_id: ${{ matrix.module_id }} secrets: maven_central_username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} maven_central_password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} signing_key: ${{ secrets.SIGNING_KEY }} signing_public_key: ${{ secrets.SIGNING_PUBLIC_KEY }} signing_password: ${{ secrets.SIGNING_PASSWORD }} + + # ── Main (aggregator) ─────────────────────────────────────────── + main: - needs: - - codec - - collision - - config - - font - - integration - - moveable-entity-block - - multiblock - - network - - recipe - - registrum - - rendering - - space-select - - sync - - util - - wheel + needs: [build-l2] uses: ./.github/workflows/build_and_test.yml with: module: main @@ -433,10 +130,10 @@ jobs: maven_url: ${{ secrets.MAVEN_URL }} maven_user: ${{ secrets.MAVEN_USER }} maven_pass: ${{ secrets.MAVEN_PASS }} + main-maven-central-deploy: + needs: [main] uses: ./.github/workflows/publish_maven_central.yml - needs: - - main with: module: main module_id: anvillib diff --git a/.github/workflows/roseau_comment.yml b/.github/workflows/roseau_comment.yml index bce66794..956e3c26 100644 --- a/.github/workflows/roseau_comment.yml +++ b/.github/workflows/roseau_comment.yml @@ -50,6 +50,12 @@ jobs: - name: Generate report body run: | + MODULES=( + codec collision config font integration + moveable-entity-block multiblock network recipe registrum + rendering space-select sync util wheel main + ) + row() { local name=$1 dir=$2 local csv="${dir}/report.csv" @@ -63,30 +69,6 @@ jobs: fi } - { - echo "## 🌿 Roseau API Breaking Change Report" - echo "" - echo "| Module | Status | Breaking Changes |" - echo "|--------|--------|-----------------|" - row "codec" "roseau-reports/roseau-codec" - row "collision" "roseau-reports/roseau-collision" - row "config" "roseau-reports/roseau-config" - row "font" "roseau-reports/roseau-font" - row "integration" "roseau-reports/roseau-integration" - row "moveable-entity-block" "roseau-reports/roseau-moveable-entity-block" - row "multiblock" "roseau-reports/roseau-multiblock" - row "network" "roseau-reports/roseau-network" - row "recipe" "roseau-reports/roseau-recipe" - row "registrum" "roseau-reports/roseau-registrum" - row "rendering" "roseau-reports/roseau-rendering" - row "space-select" "roseau-reports/roseau-space-select" - row "sync" "roseau-reports/roseau-sync" - row "util" "roseau-reports/roseau-util" - row "wheel" "roseau-reports/roseau-wheel" - row "main" "roseau-reports/roseau-main" - echo "" - } > /tmp/roseau-body.md - append_details() { local name=$1 dir=$2 local csv="${dir}/report.csv" @@ -110,22 +92,20 @@ jobs: } >> /tmp/roseau-body.md } - append_details "codec" "roseau-reports/roseau-codec" - append_details "collision" "roseau-reports/roseau-collision" - append_details "config" "roseau-reports/roseau-config" - append_details "font" "roseau-reports/roseau-font" - append_details "integration" "roseau-reports/roseau-integration" - append_details "moveable-entity-block" "roseau-reports/roseau-moveable-entity-block" - append_details "multiblock" "roseau-reports/roseau-multiblock" - append_details "network" "roseau-reports/roseau-network" - append_details "recipe" "roseau-reports/roseau-recipe" - append_details "registrum" "roseau-reports/roseau-registrum" - append_details "rendering" "roseau-reports/roseau-rendering" - append_details "space-select" "roseau-reports/roseau-space-select" - append_details "sync" "roseau-reports/roseau-sync" - append_details "util" "roseau-reports/roseau-util" - append_details "wheel" "roseau-reports/roseau-wheel" - append_details "main" "roseau-reports/roseau-main" + { + echo "## 🌿 Roseau API Breaking Change Report" + echo "" + echo "| Module | Status | Breaking Changes |" + echo "|--------|--------|-----------------|" + for mod in "${MODULES[@]}"; do + row "$mod" "roseau-reports/roseau-${mod}" + done + echo "" + } > /tmp/roseau-body.md + + for mod in "${MODULES[@]}"; do + append_details "$mod" "roseau-reports/roseau-${mod}" + done echo "> Full CSVs: see the *Artifacts* section of [this workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }})." >> /tmp/roseau-body.md From b6fa3b99fb2c2f0e62ddfeabe047c39b3e306aa5 Mon Sep 17 00:00:00 2001 From: Gugle Date: Tue, 23 Jun 2026 08:01:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E4=BE=9D=E8=B5=96=E5=85=B3=E7=B3=BB=E7=A1=AE?= =?UTF-8?q?=E4=BF=9Dprepare=E6=AD=A5=E9=AA=A4=E6=AD=A3=E7=A1=AE=E6=89=A7?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在ci.yml中为build-l1、build-l2、deploy-l0、deploy-l1、deploy-l2任务添加prepare依赖 - 在pull_request.yml中为build-l1、build-l2、roseau-l0、roseau-l1、roseau-l2任务添加prepare依赖 - 在release.yml中为build-l1、build-l2、deploy-l0、deploy-l1、deploy-l2任务添加prepare依赖 - 确保所有矩阵构建任务都等待prepare步骤完成以获取正确的输出参数 - 修复了多层依赖构建流程中的潜在执行顺序问题 --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/pull_request.yml | 10 +++++----- .github/workflows/release.yml | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4877f5d..de8bc365 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: maven_pass: ${{ secrets.MAVEN_PASS }} build-l1: - needs: [build-l0] + needs: [prepare, build-l0] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/build_and_test.yml @@ -66,7 +66,7 @@ jobs: maven_pass: ${{ secrets.MAVEN_PASS }} build-l2: - needs: [build-l1] + needs: [prepare, build-l1] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/build_and_test.yml @@ -84,7 +84,7 @@ jobs: # ── Maven Central deploy ──────────────────────────────────────── deploy-l0: - needs: [build-l0] + needs: [prepare, build-l0] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_0) }} uses: ./.github/workflows/publish_maven_central.yml @@ -99,7 +99,7 @@ jobs: signing_password: ${{ secrets.SIGNING_PASSWORD }} deploy-l1: - needs: [build-l1] + needs: [prepare, build-l1] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/publish_maven_central.yml @@ -114,7 +114,7 @@ jobs: signing_password: ${{ secrets.SIGNING_PASSWORD }} deploy-l2: - needs: [build-l2] + needs: [prepare, build-l2] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/publish_maven_central.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d072ef17..61f7ffff 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -52,7 +52,7 @@ jobs: pr_build: true build-l1: - needs: [build-l0] + needs: [prepare, build-l0] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/build_and_test.yml @@ -64,7 +64,7 @@ jobs: pr_build: true build-l2: - needs: [build-l1] + needs: [prepare, build-l1] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/build_and_test.yml @@ -78,7 +78,7 @@ jobs: # ── Roseau API checks ─────────────────────────────────────────── roseau-l0: - needs: [build-l0] + needs: [prepare, build-l0] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_0) }} uses: ./.github/workflows/roseau_check.yml @@ -87,7 +87,7 @@ jobs: module_id: ${{ matrix.module_id }} roseau-l1: - needs: [build-l1] + needs: [prepare, build-l1] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/roseau_check.yml @@ -96,7 +96,7 @@ jobs: module_id: ${{ matrix.module_id }} roseau-l2: - needs: [build-l2] + needs: [prepare, build-l2] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/roseau_check.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa27b7f9..8f7f22ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: maven_pass: ${{ secrets.MAVEN_PASS }} build-l1: - needs: [build-l0] + needs: [prepare, build-l0] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/build_and_test.yml @@ -53,7 +53,7 @@ jobs: maven_pass: ${{ secrets.MAVEN_PASS }} build-l2: - needs: [build-l1] + needs: [prepare, build-l1] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/build_and_test.yml @@ -71,7 +71,7 @@ jobs: # ── Maven Central deploy ──────────────────────────────────────── deploy-l0: - needs: [build-l0] + needs: [prepare, build-l0] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_0) }} uses: ./.github/workflows/publish_maven_central.yml @@ -86,7 +86,7 @@ jobs: signing_password: ${{ secrets.SIGNING_PASSWORD }} deploy-l1: - needs: [build-l1] + needs: [prepare, build-l1] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_1) }} uses: ./.github/workflows/publish_maven_central.yml @@ -101,7 +101,7 @@ jobs: signing_password: ${{ secrets.SIGNING_PASSWORD }} deploy-l2: - needs: [build-l2] + needs: [prepare, build-l2] strategy: matrix: ${{ fromJSON(needs.prepare.outputs.level_2) }} uses: ./.github/workflows/publish_maven_central.yml