Skip to content

Commit

Permalink
Port platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
MOZGIII committed Sep 8, 2023
1 parent 54946a8 commit 2ba14d1
Showing 1 changed file with 22 additions and 29 deletions.
51 changes: 22 additions & 29 deletions .github/actions/plan/platforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export const selfHostedRunners = {
} as const;

export type RunnerOS =
| "ubuntu-22.04"
| "ubuntu-20.04"
| "windows-latest"
| "macos-latest"
Expand All @@ -12,13 +11,14 @@ export type RunnerOS =
export type Platform = {
name: string;
os: RunnerOS;
isOnSelfHostedRunner: boolean;
buildEnvScript: string;
essential: boolean;
env: Record<string, string>;
cacheKey: string;
artifactMarker: string | null;
isBroken: boolean;
buildTarget: string | null;
buildTargetDir: string | null;
extraTargetsToInstall: string[];
};

export type Platforms = Record<string, Platform>;
Expand All @@ -29,64 +29,57 @@ const buildEnvScriptPath = (script: string) =>

// All the platforms that we support, and their respective settings.
export const all = {
ubuntu2204: {
name: "Ubuntu 22.04",
os: "ubuntu-22.04",
buildEnvScript: buildEnvScriptPath("ubuntu.sh"),
isOnSelfHostedRunner: false,
essential: true,
env: {},
cacheKey: "ubuntu2204-amd64",
artifactMarker: "ubuntu2204",
isBroken: false,
},
ubuntu2004: {
name: "Ubuntu 20.04",
ubuntu: {
name: "Ubuntu",
os: "ubuntu-20.04",
buildEnvScript: buildEnvScriptPath("ubuntu.sh"),
isOnSelfHostedRunner: false,
essential: false,
essential: true,
env: {},
cacheKey: "ubuntu2004-amd64",
artifactMarker: "ubuntu2004",
cacheKey: "ubuntu-amd64",
isBroken: false,
buildTarget: "x86_64-unknown-linux-gnu.2.17",
buildTargetDir: "x86_64-unknown-linux-gnu",
extraTargetsToInstall: [], // native
},
windows: {
name: "Windows",
os: "windows-latest",
buildEnvScript: buildEnvScriptPath("windows.sh"),
isOnSelfHostedRunner: false,
essential: false,
env: {
CARGO_INCREMENTAL: "0",
},
cacheKey: "windows-amd64",
artifactMarker: null,
isBroken: true,
isBroken: false,
buildTarget: null, // native
buildTargetDir: null, // native
extraTargetsToInstall: [], // native
},
macos: {
name: "macOS (amd64)",
os: "macos-latest",
buildEnvScript: buildEnvScriptPath("macos.sh"),
isOnSelfHostedRunner: false,
essential: false,
env: {},
cacheKey: "macos-amd64",
artifactMarker: null,
isBroken: false,
buildTarget: null, // native
buildTargetDir: null, // native
extraTargetsToInstall: [], // native
},
macos_aarch64: {
name: "macOS (aarch64)",
os: selfHostedRunners.macosAarch64,
os: ["self-hosted", "macOS", "aarch64"],
buildEnvScript: buildEnvScriptPath("macos.sh"),
isOnSelfHostedRunner: true,
essential: false,
env: {},
cacheKey: "macos-aarch64",
artifactMarker: null,
isBroken: false,
buildTarget: null, // native
buildTargetDir: null, // native
extraTargetsToInstall: [], // native
},
} satisfies Platforms;

// A platform for running things that are platform-independent.
export const core = all.ubuntu2204 satisfies Platform;
export const core = all.ubuntu satisfies Platform;

0 comments on commit 2ba14d1

Please sign in to comment.