mirror of
https://github.com/DeterminateSystems/ci.git
synced 2025-06-11 03:58:43 +02:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
aed95d57dd
2 changed files with 34 additions and 13 deletions
6
.github/workflows/workflow.yml
vendored
6
.github/workflows/workflow.yml
vendored
|
@ -16,6 +16,11 @@ on:
|
||||||
required: false
|
required: false
|
||||||
default: "."
|
default: "."
|
||||||
type: string
|
type: string
|
||||||
|
fail-fast:
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
description: "Whether to cancel all in-progress jobs if any matrix job fails"
|
||||||
runner-map:
|
runner-map:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -93,6 +98,7 @@ jobs:
|
||||||
runs-on: ${{ matrix.systems.runner }}
|
runs-on: ${{ matrix.systems.runner }}
|
||||||
needs: inventory
|
needs: inventory
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: ${{ inputs.fail-fast }}
|
||||||
matrix:
|
matrix:
|
||||||
systems: ${{ fromJSON(needs.inventory.outputs.systems) }}
|
systems: ${{ fromJSON(needs.inventory.outputs.systems) }}
|
||||||
|
|
||||||
|
|
41
README.md
41
README.md
|
@ -99,25 +99,24 @@ ERROR magic_nix_cache: FlakeHub cache initialization failed: FlakeHub cache erro
|
||||||
|
|
||||||
#### GitHub Actions Runners
|
#### GitHub Actions Runners
|
||||||
|
|
||||||
##### Standard & larger runners
|
##### Standard and larger runners
|
||||||
|
|
||||||
By default, the CI maps the Nix systems to their equivalent GitHub-hosted runners:
|
By default, the CI maps the Nix systems to their equivalent GitHub-hosted runners:
|
||||||
|
|
||||||
| | macOS (Apple Silicon) | ARM Linux | macOS (Intel) | x86 Linux |
|
| | macOS (Apple Silicon) | ARM Linux | macOS (Intel) | x86 Linux |
|
||||||
|---|---|---|---|---|
|
| ------------------------------------------------- | ------------------------------------ | --------------------------- | ------------------------------------ | --------------------------- |
|
||||||
| Flake `system:` (Nix build platform) | `aarch64-darwin` | `aarch64-linux` | `x86_64-darwin` | `x86_64-linux` |
|
| Flake `system` (Nix build platform) | `aarch64-darwin` | `aarch64-linux` | `x86_64-darwin` | `x86_64-linux` |
|
||||||
| [GitHub Actions Runner][runners] (workflow label) | `macos-latest` (using Apple Silicon) | `ubuntu-latest` (using x86) | `macos-latest` (using Apple Silicon) | `ubuntu-latest` (using x86) |
|
| [GitHub Actions Runner][runners] (workflow label) | `macos-latest` (using Apple Silicon) | `ubuntu-latest` (using x86) | `macos-latest` (using Apple Silicon) | `ubuntu-latest` (using x86) |
|
||||||
|
|
||||||
> [!INFO]
|
> [!NOTE]
|
||||||
> There is also a [standard ARM Linux runner][runners-linux-arm] `ubuntu-24.04-arm`, currently in public preview and only supported on public repositories.
|
> There is also a [standard ARM Linux runner][runners-linux-arm] `ubuntu-24.04-arm`, currently in public preview and only supported on public repositories.
|
||||||
> To use it, supply your own runner map as shown below.
|
> To use it, supply your own runner map as shown below.
|
||||||
> To use ARM Linux runners on private repositories, you need a non-standard runners, as shown below.
|
> To use ARM Linux runners on private repositories, you need non-standard runners, as shown below.
|
||||||
|
|
||||||
##### Non-Standard runners
|
##### Non-standard runners
|
||||||
|
|
||||||
You can also use several types of non-standard runners by providing a custom runner map.
|
You can also use several types of non-standard runners by providing a custom runner map.
|
||||||
|
For example, this runner map enables the [larger GitHub runners for macOS][runners-large-macos]:
|
||||||
For example, this runner-map enables the [larger GitHub runners for macOS][runners-large-macos]:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -135,7 +134,7 @@ jobs:
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> Using `macos-latest-large` is currently the only way to run *current* macOS on Intel architecture.
|
> Using `macos-latest-large` is currently the only way to run _current_ macOS on Intel architecture.
|
||||||
|
|
||||||
The other two types of runners are those provisioned on your own infrastructure, and [larger Ubuntu (not macOS) runners][runners-large] with bespoke specs (for example, 64 CPUs, 128GB RAM) hosted by GitHub.
|
The other two types of runners are those provisioned on your own infrastructure, and [larger Ubuntu (not macOS) runners][runners-large] with bespoke specs (for example, 64 CPUs, 128GB RAM) hosted by GitHub.
|
||||||
Confusingly, GitHub sometimes refers to both of these as "self-hosted" runners.
|
Confusingly, GitHub sometimes refers to both of these as "self-hosted" runners.
|
||||||
|
@ -146,9 +145,9 @@ Confusingly, GitHub sometimes refers to both of these as "self-hosted" runners.
|
||||||
>
|
>
|
||||||
> ```diff
|
> ```diff
|
||||||
> jobs:
|
> jobs:
|
||||||
> DeterminateCI:
|
> DeterminateCI:
|
||||||
> - uses: DeterminateSystems/ci/.github/workflows/workflow.yml@main
|
> - uses: DeterminateSystems/ci/.github/workflows/workflow.yml@main
|
||||||
> + uses: $YOURORG/ci/.github/workflows/workflow.yml@main
|
> + uses: $YOURORG/ci/.github/workflows/workflow.yml@main
|
||||||
> ```
|
> ```
|
||||||
>
|
>
|
||||||
> Replace `$YOURORG` with your own organisation or user.
|
> Replace `$YOURORG` with your own organisation or user.
|
||||||
|
@ -172,6 +171,22 @@ jobs:
|
||||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Continue on failure
|
||||||
|
|
||||||
|
By default, if any build in the matrix fails, the workflow will cancel all remaining in-progress jobs.
|
||||||
|
You can change this behavior by setting `fail-fast` to `false`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jobs:
|
||||||
|
DeterminateCI:
|
||||||
|
uses: DeterminateSystems/ci/.github/workflows/workflow.yml@main
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
with:
|
||||||
|
fail-fast: false
|
||||||
|
```
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
This workflow uses a collection of GitHub Actions by Determinate Systems, all of which are covered by the Determinate Systems [privacy policy][privacy] and [terms of service][tos].
|
This workflow uses a collection of GitHub Actions by Determinate Systems, all of which are covered by the Determinate Systems [privacy policy][privacy] and [terms of service][tos].
|
||||||
|
|
Loading…
Add table
Reference in a new issue