From 4e0c9b14e449beb8aa6872b8b85db922535a3eca Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 18 Jul 2023 10:49:20 +0800 Subject: [PATCH] fix(cli): created template missing macOS testing (#1659) --- cli/src/api/templates/ci.yml.ts | 10 +- triples/index.cjs | 599 ++++++++++++++++---------------- 2 files changed, 307 insertions(+), 302 deletions(-) diff --git a/cli/src/api/templates/ci.yml.ts b/cli/src/api/templates/ci.yml.ts index ec015f96..f8f5770d 100644 --- a/cli/src/api/templates/ci.yml.ts +++ b/cli/src/api/templates/ci.yml.ts @@ -63,10 +63,16 @@ export const createGithubActionsCIYml = ( if (!enableWindowsX86 && !enableMacOSX86) { delete fullTemplate.jobs[TEST_MACOS_WINDOWS] } else { - const filterTarget = enableWindowsX86 ? 'macos-latest' : 'windows-latest' + const filterTargets = new Set() + if (enableWindowsX86) { + filterTargets.add('windows-latest') + } + if (enableMacOSUni || enableMacOSX86) { + filterTargets.add('macos-latest') + } fullTemplate.jobs[TEST_MACOS_WINDOWS].strategy.matrix.settings = fullTemplate.jobs[TEST_MACOS_WINDOWS].strategy.matrix.settings.filter( - ({ host }: { host: string; target: string }) => host !== filterTarget, + ({ host }: { host: string; target: string }) => filterTargets.has(host), ) requiredSteps.push(TEST_MACOS_WINDOWS) diff --git a/triples/index.cjs b/triples/index.cjs index 26414523..cd353e71 100644 --- a/triples/index.cjs +++ b/triples/index.cjs @@ -1,393 +1,392 @@ - module.exports.platformArchTriples = { - "darwin": { - "arm64": [ + darwin: { + arm64: [ { - "triple": "aarch64-apple-darwin", - "platformArchABI": "darwin-arm64", - "platform": "darwin", - "arch": "arm64", - "abi": null - } + triple: 'aarch64-apple-darwin', + platformArchABI: 'darwin-arm64', + platform: 'darwin', + arch: 'arm64', + abi: null, + }, ], - "x64": [ + x64: [ { - "triple": "x86_64-apple-darwin", - "platformArchABI": "darwin-x64", - "platform": "darwin", - "arch": "x64", - "abi": null - } - ] + triple: 'x86_64-apple-darwin', + platformArchABI: 'darwin-x64', + platform: 'darwin', + arch: 'x64', + abi: null, + }, + ], }, - "ios": { - "arm64": [ + ios: { + arm64: [ { - "triple": "aarch64-apple-ios", - "platformArchABI": "ios-arm64", - "platform": "ios", - "arch": "arm64", - "abi": null - } + triple: 'aarch64-apple-ios', + platformArchABI: 'ios-arm64', + platform: 'ios', + arch: 'arm64', + abi: null, + }, ], - "x64": [ + x64: [ { - "triple": "x86_64-apple-ios", - "platformArchABI": "ios-x64", - "platform": "ios", - "arch": "x64", - "abi": null - } - ] + triple: 'x86_64-apple-ios', + platformArchABI: 'ios-x64', + platform: 'ios', + arch: 'x64', + abi: null, + }, + ], }, - "android": { - "arm64": [ + android: { + arm64: [ { - "triple": "aarch64-linux-android", - "platformArchABI": "android-arm64", - "platform": "android", - "arch": "arm64", - "abi": null - } + triple: 'aarch64-linux-android', + platformArchABI: 'android-arm64', + platform: 'android', + arch: 'arm64', + abi: null, + }, ], - "arm": [ + arm: [ { - "triple": "armv7-linux-androideabi", - "platformArchABI": "android-arm-eabi", - "platform": "android", - "arch": "arm", - "abi": "eabi" - } + triple: 'armv7-linux-androideabi', + platformArchABI: 'android-arm-eabi', + platform: 'android', + arch: 'arm', + abi: 'eabi', + }, ], - "ia32": [ + ia32: [ { - "triple": "i686-linux-android", - "platformArchABI": "android-ia32", - "platform": "android", - "arch": "ia32", - "abi": null - } + triple: 'i686-linux-android', + platformArchABI: 'android-ia32', + platform: 'android', + arch: 'ia32', + abi: null, + }, ], - "x64": [ + x64: [ { - "triple": "x86_64-linux-android", - "platformArchABI": "android-x64", - "platform": "android", - "arch": "x64", - "abi": null - } - ] + triple: 'x86_64-linux-android', + platformArchABI: 'android-x64', + platform: 'android', + arch: 'x64', + abi: null, + }, + ], }, - "win32": { - "arm64": [ + win32: { + arm64: [ { - "triple": "aarch64-pc-windows-msvc", - "platformArchABI": "win32-arm64-msvc", - "platform": "win32", - "arch": "arm64", - "abi": "msvc" - } + triple: 'aarch64-pc-windows-msvc', + platformArchABI: 'win32-arm64-msvc', + platform: 'win32', + arch: 'arm64', + abi: 'msvc', + }, ], - "ia32": [ + ia32: [ { - "triple": "i686-pc-windows-gnu", - "platformArchABI": "win32-ia32-gnu", - "platform": "win32", - "arch": "ia32", - "abi": "gnu" + triple: 'i686-pc-windows-gnu', + platformArchABI: 'win32-ia32-gnu', + platform: 'win32', + arch: 'ia32', + abi: 'gnu', }, { - "triple": "i686-pc-windows-msvc", - "platformArchABI": "win32-ia32-msvc", - "platform": "win32", - "arch": "ia32", - "abi": "msvc" - } + triple: 'i686-pc-windows-msvc', + platformArchABI: 'win32-ia32-msvc', + platform: 'win32', + arch: 'ia32', + abi: 'msvc', + }, ], - "x64": [ + x64: [ { - "triple": "x86_64-pc-windows-gnu", - "platformArchABI": "win32-x64-gnu", - "platform": "win32", - "arch": "x64", - "abi": "gnu" + triple: 'x86_64-pc-windows-gnu', + platformArchABI: 'win32-x64-gnu', + platform: 'win32', + arch: 'x64', + abi: 'gnu', }, { - "triple": "x86_64-pc-windows-msvc", - "platformArchABI": "win32-x64-msvc", - "platform": "win32", - "arch": "x64", - "abi": "msvc" - } - ] + triple: 'x86_64-pc-windows-msvc', + platformArchABI: 'win32-x64-msvc', + platform: 'win32', + arch: 'x64', + abi: 'msvc', + }, + ], }, - "linux": { - "arm64": [ + linux: { + arm64: [ { - "triple": "aarch64-unknown-linux-gnu", - "platformArchABI": "linux-arm64-gnu", - "platform": "linux", - "arch": "arm64", - "abi": "gnu" + triple: 'aarch64-unknown-linux-gnu', + platformArchABI: 'linux-arm64-gnu', + platform: 'linux', + arch: 'arm64', + abi: 'gnu', }, { - "triple": "aarch64-unknown-linux-musl", - "platformArchABI": "linux-arm64-musl", - "platform": "linux", - "arch": "arm64", - "abi": "musl" - } + triple: 'aarch64-unknown-linux-musl', + platformArchABI: 'linux-arm64-musl', + platform: 'linux', + arch: 'arm64', + abi: 'musl', + }, ], - "arm": [ + arm: [ { - "triple": "arm-unknown-linux-gnueabi", - "platformArchABI": "linux-arm-gnu", - "platform": "linux", - "arch": "arm", - "abi": "gnu" + triple: 'arm-unknown-linux-gnueabi', + platformArchABI: 'linux-arm-gnu', + platform: 'linux', + arch: 'arm', + abi: 'gnu', }, { - "triple": "arm-unknown-linux-gnueabihf", - "platformArchABI": "linux-arm-gnueabihf", - "platform": "linux", - "arch": "arm", - "abi": "gnueabihf" + triple: 'arm-unknown-linux-gnueabihf', + platformArchABI: 'linux-arm-gnueabihf', + platform: 'linux', + arch: 'arm', + abi: 'gnueabihf', }, { - "triple": "arm-unknown-linux-musleabi", - "platformArchABI": "linux-arm-musl", - "platform": "linux", - "arch": "arm", - "abi": "musl" + triple: 'arm-unknown-linux-musleabi', + platformArchABI: 'linux-arm-musl', + platform: 'linux', + arch: 'arm', + abi: 'musl', }, { - "triple": "arm-unknown-linux-musleabihf", - "platformArchABI": "linux-arm-musleabihf", - "platform": "linux", - "arch": "arm", - "abi": "musleabihf" + triple: 'arm-unknown-linux-musleabihf', + platformArchABI: 'linux-arm-musleabihf', + platform: 'linux', + arch: 'arm', + abi: 'musleabihf', }, { - "triple": "armv7-unknown-linux-gnueabi", - "platformArchABI": "linux-arm-gnu", - "platform": "linux", - "arch": "arm", - "abi": "gnu" + triple: 'armv7-unknown-linux-gnueabi', + platformArchABI: 'linux-arm-gnu', + platform: 'linux', + arch: 'arm', + abi: 'gnu', }, { - "triple": "armv7-unknown-linux-gnueabihf", - "platformArchABI": "linux-arm-gnueabihf", - "platform": "linux", - "arch": "arm", - "abi": "gnueabihf" + triple: 'armv7-unknown-linux-gnueabihf', + platformArchABI: 'linux-arm-gnueabihf', + platform: 'linux', + arch: 'arm', + abi: 'gnueabihf', }, { - "triple": "armv7-unknown-linux-musleabi", - "platformArchABI": "linux-arm-musl", - "platform": "linux", - "arch": "arm", - "abi": "musl" + triple: 'armv7-unknown-linux-musleabi', + platformArchABI: 'linux-arm-musl', + platform: 'linux', + arch: 'arm', + abi: 'musl', }, { - "triple": "armv7-unknown-linux-musleabihf", - "platformArchABI": "linux-arm-musleabihf", - "platform": "linux", - "arch": "arm", - "abi": "musleabihf" - } + triple: 'armv7-unknown-linux-musleabihf', + platformArchABI: 'linux-arm-musleabihf', + platform: 'linux', + arch: 'arm', + abi: 'musleabihf', + }, ], - "armv5te": [ + armv5te: [ { - "triple": "armv5te-unknown-linux-gnueabi", - "platformArchABI": "linux-armv5te-gnu", - "platform": "linux", - "arch": "armv5te", - "abi": "gnu" + triple: 'armv5te-unknown-linux-gnueabi', + platformArchABI: 'linux-armv5te-gnu', + platform: 'linux', + arch: 'armv5te', + abi: 'gnu', }, { - "triple": "armv5te-unknown-linux-musleabi", - "platformArchABI": "linux-armv5te-musl", - "platform": "linux", - "arch": "armv5te", - "abi": "musl" - } + triple: 'armv5te-unknown-linux-musleabi', + platformArchABI: 'linux-armv5te-musl', + platform: 'linux', + arch: 'armv5te', + abi: 'musl', + }, ], - "ia32": [ + ia32: [ { - "triple": "i686-unknown-linux-gnu", - "platformArchABI": "linux-ia32-gnu", - "platform": "linux", - "arch": "ia32", - "abi": "gnu" + triple: 'i686-unknown-linux-gnu', + platformArchABI: 'linux-ia32-gnu', + platform: 'linux', + arch: 'ia32', + abi: 'gnu', }, { - "triple": "i686-unknown-linux-musl", - "platformArchABI": "linux-ia32-musl", - "platform": "linux", - "arch": "ia32", - "abi": "musl" - } + triple: 'i686-unknown-linux-musl', + platformArchABI: 'linux-ia32-musl', + platform: 'linux', + arch: 'ia32', + abi: 'musl', + }, ], - "mips": [ + mips: [ { - "triple": "mips-unknown-linux-gnu", - "platformArchABI": "linux-mips-gnu", - "platform": "linux", - "arch": "mips", - "abi": "gnu" + triple: 'mips-unknown-linux-gnu', + platformArchABI: 'linux-mips-gnu', + platform: 'linux', + arch: 'mips', + abi: 'gnu', }, { - "triple": "mips-unknown-linux-musl", - "platformArchABI": "linux-mips-musl", - "platform": "linux", - "arch": "mips", - "abi": "musl" - } + triple: 'mips-unknown-linux-musl', + platformArchABI: 'linux-mips-musl', + platform: 'linux', + arch: 'mips', + abi: 'musl', + }, ], - "mips64": [ + mips64: [ { - "triple": "mips64-unknown-linux-gnuabi64", - "platformArchABI": "linux-mips64-gnuabi64", - "platform": "linux", - "arch": "mips64", - "abi": "gnuabi64" + triple: 'mips64-unknown-linux-gnuabi64', + platformArchABI: 'linux-mips64-gnuabi64', + platform: 'linux', + arch: 'mips64', + abi: 'gnuabi64', }, { - "triple": "mips64-unknown-linux-muslabi64", - "platformArchABI": "linux-mips64-muslabi64", - "platform": "linux", - "arch": "mips64", - "abi": "muslabi64" - } + triple: 'mips64-unknown-linux-muslabi64', + platformArchABI: 'linux-mips64-muslabi64', + platform: 'linux', + arch: 'mips64', + abi: 'muslabi64', + }, ], - "mips64el": [ + mips64el: [ { - "triple": "mips64el-unknown-linux-gnuabi64", - "platformArchABI": "linux-mips64el-gnuabi64", - "platform": "linux", - "arch": "mips64el", - "abi": "gnuabi64" + triple: 'mips64el-unknown-linux-gnuabi64', + platformArchABI: 'linux-mips64el-gnuabi64', + platform: 'linux', + arch: 'mips64el', + abi: 'gnuabi64', }, { - "triple": "mips64el-unknown-linux-muslabi64", - "platformArchABI": "linux-mips64el-muslabi64", - "platform": "linux", - "arch": "mips64el", - "abi": "muslabi64" - } + triple: 'mips64el-unknown-linux-muslabi64', + platformArchABI: 'linux-mips64el-muslabi64', + platform: 'linux', + arch: 'mips64el', + abi: 'muslabi64', + }, ], - "mipsel": [ + mipsel: [ { - "triple": "mipsel-unknown-linux-gnu", - "platformArchABI": "linux-mipsel-gnu", - "platform": "linux", - "arch": "mipsel", - "abi": "gnu" + triple: 'mipsel-unknown-linux-gnu', + platformArchABI: 'linux-mipsel-gnu', + platform: 'linux', + arch: 'mipsel', + abi: 'gnu', }, { - "triple": "mipsel-unknown-linux-musl", - "platformArchABI": "linux-mipsel-musl", - "platform": "linux", - "arch": "mipsel", - "abi": "musl" - } + triple: 'mipsel-unknown-linux-musl', + platformArchABI: 'linux-mipsel-musl', + platform: 'linux', + arch: 'mipsel', + abi: 'musl', + }, ], - "powerpc": [ + powerpc: [ { - "triple": "powerpc-unknown-linux-gnu", - "platformArchABI": "linux-powerpc-gnu", - "platform": "linux", - "arch": "powerpc", - "abi": "gnu" - } + triple: 'powerpc-unknown-linux-gnu', + platformArchABI: 'linux-powerpc-gnu', + platform: 'linux', + arch: 'powerpc', + abi: 'gnu', + }, ], - "powerpc64": [ + powerpc64: [ { - "triple": "powerpc64-unknown-linux-gnu", - "platformArchABI": "linux-powerpc64-gnu", - "platform": "linux", - "arch": "powerpc64", - "abi": "gnu" - } + triple: 'powerpc64-unknown-linux-gnu', + platformArchABI: 'linux-powerpc64-gnu', + platform: 'linux', + arch: 'powerpc64', + abi: 'gnu', + }, ], - "powerpc64le": [ + powerpc64le: [ { - "triple": "powerpc64le-unknown-linux-gnu", - "platformArchABI": "linux-powerpc64le-gnu", - "platform": "linux", - "arch": "powerpc64le", - "abi": "gnu" - } + triple: 'powerpc64le-unknown-linux-gnu', + platformArchABI: 'linux-powerpc64le-gnu', + platform: 'linux', + arch: 'powerpc64le', + abi: 'gnu', + }, ], - "riscv64": [ + riscv64: [ { - "triple": "riscv64gc-unknown-linux-gnu", - "platformArchABI": "linux-riscv64-gnu", - "platform": "linux", - "arch": "riscv64", - "abi": "gnu" - } + triple: 'riscv64gc-unknown-linux-gnu', + platformArchABI: 'linux-riscv64-gnu', + platform: 'linux', + arch: 'riscv64', + abi: 'gnu', + }, ], - "s390x": [ + s390x: [ { - "triple": "s390x-unknown-linux-gnu", - "platformArchABI": "linux-s390x-gnu", - "platform": "linux", - "arch": "s390x", - "abi": "gnu" - } + triple: 's390x-unknown-linux-gnu', + platformArchABI: 'linux-s390x-gnu', + platform: 'linux', + arch: 's390x', + abi: 'gnu', + }, ], - "sparc64": [ + sparc64: [ { - "triple": "sparc64-unknown-linux-gnu", - "platformArchABI": "linux-sparc64-gnu", - "platform": "linux", - "arch": "sparc64", - "abi": "gnu" - } + triple: 'sparc64-unknown-linux-gnu', + platformArchABI: 'linux-sparc64-gnu', + platform: 'linux', + arch: 'sparc64', + abi: 'gnu', + }, ], - "x64": [ + x64: [ { - "triple": "x86_64-unknown-linux-gnu", - "platformArchABI": "linux-x64-gnu", - "platform": "linux", - "arch": "x64", - "abi": "gnu" + triple: 'x86_64-unknown-linux-gnu', + platformArchABI: 'linux-x64-gnu', + platform: 'linux', + arch: 'x64', + abi: 'gnu', }, { - "triple": "x86_64-unknown-linux-gnux32", - "platformArchABI": "linux-x64-gnux32", - "platform": "linux", - "arch": "x64", - "abi": "gnux32" + triple: 'x86_64-unknown-linux-gnux32', + platformArchABI: 'linux-x64-gnux32', + platform: 'linux', + arch: 'x64', + abi: 'gnux32', }, { - "triple": "x86_64-unknown-linux-musl", - "platformArchABI": "linux-x64-musl", - "platform": "linux", - "arch": "x64", - "abi": "musl" - } - ] + triple: 'x86_64-unknown-linux-musl', + platformArchABI: 'linux-x64-musl', + platform: 'linux', + arch: 'x64', + abi: 'musl', + }, + ], }, - "freebsd": { - "ia32": [ + freebsd: { + ia32: [ { - "triple": "i686-unknown-freebsd", - "platformArchABI": "freebsd-ia32", - "platform": "freebsd", - "arch": "ia32", - "abi": null - } + triple: 'i686-unknown-freebsd', + platformArchABI: 'freebsd-ia32', + platform: 'freebsd', + arch: 'ia32', + abi: null, + }, ], - "x64": [ + x64: [ { - "triple": "x86_64-unknown-freebsd", - "platformArchABI": "freebsd-x64", - "platform": "freebsd", - "arch": "x64", - "abi": null - } - ] - } + triple: 'x86_64-unknown-freebsd', + platformArchABI: 'freebsd-x64', + platform: 'freebsd', + arch: 'x64', + abi: null, + }, + ], + }, }