diff --git a/.github/scripts/get-matrix.ts b/.github/scripts/get-matrix.ts index 8b98ec4332..0787fea5ab 100755 --- a/.github/scripts/get-matrix.ts +++ b/.github/scripts/get-matrix.ts @@ -13,8 +13,8 @@ for (const platform of await get_platforms(project)) { const ghout = Deno.env.get("GITHUB_OUTPUT") if (ghout) { - const json = JSON.stringify({platform: Object.values(rv)}) - Deno.writeTextFileSync(ghout, `matrix=${json}`, { append: true }) + const json = JSON.stringify(Object.values(rv)) + Deno.writeTextFileSync(ghout, `matrix=${json}`, {append: true}) } else { const json = JSON.stringify(rv, null, 2) console.log(json) @@ -38,42 +38,38 @@ let { platforms } = await hooks.usePantry().project(pkg).yaml() } function get_matrix(platform: string) { + const name = platform.replace('/', '+') switch (platform) { case 'darwin/aarch64': { const os = ["self-hosted", "macOS", "ARM64"] return { - os, + os, name, "test-os": [os], "test-container": [null], - name: platform, tinyname: "²" }} case 'darwin/x86-64': { const os = ["self-hosted", "macOS", "X64"] return { - os, + os, name, "test-os": ["macos-11", "macos-12"], "test-container": [null], - name: platform, tinyname: "x64" }} case 'linux/x86-64': { const os = {group: "linux-x86-64"} return { - os, + os, name, "test-os": [os], "test-container": ["debian:buster-slim", "ubuntu", "archlinux"], - name: platform, - tinyname: "Linux x64" + tinyname: "Lx.x64" }} case 'linux/aarch64': { const os = ["self-hosted", "linux", "ARM64"] return { - os, + os, name, "test-os": [os], "test-container": [null], - name: platform, - tinyname: "Linux ARM64" - }} - } + tinyname: "Lx.ARM64" + }}} } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a822d587c7..e0f7316204 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,10 +44,10 @@ jobs: - os: ["self-hosted", "macOS", "ARM64"] name: ² - os: ["self-hosted", "linux", "ARM64"] - name: 🐧arm64 + name: Lx.ARM64 - os: {group: "linux-x86-64"} container: debian:buster-slim - name: 🐧x64 + name: Lx.x64 runs-on: ${{ matrix.platform.os }} container: ${{ matrix.platform.container }} steps: diff --git a/.github/workflows/pkg.yml b/.github/workflows/pkg.yml index 742f72280d..7753d5e847 100644 --- a/.github/workflows/pkg.yml +++ b/.github/workflows/pkg.yml @@ -22,18 +22,13 @@ jobs: - run: .github/scripts/get-matrix.ts ${{ inputs.pkg }} id: matrix - debug: - needs: get-matrix - runs-on: ubuntu-latest - steps: - - run: echo '${{needs.get-matrix.outputs.matrix}}' - pkgit: needs: get-matrix name: ${{matrix.platform.tinyname}} strategy: fail-fast: false - matrix: ${{ fromJSON(needs.get-matrix.outputs.matrix) }} + matrix: + platform: ${{ fromJSON(needs.get-matrix.outputs.matrix) }} uses: ./.github/workflows/pkg-for-platform.yml with: pkg: ${{ inputs.pkg }}