-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Experiment: use Tweag's self-hosted runners (#2037)
* Use Tweag's self hosted runners for the CI * Explicitely use find from nixpkgs#findutils in CI It is not installed by default on our self-hosted runners. --------- Co-authored-by: Yuriy Taraday <[email protected]>
- Loading branch information
Showing
2 changed files
with
13 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,15 +16,12 @@ jobs: | |
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- [self-hosted, Linux, X64] | ||
- [self-hosted, macOS, ARM64] | ||
rust_channel: | ||
- stable | ||
include: | ||
- os: ubuntu-latest | ||
system: x86_64-linux | ||
- os: macos-latest | ||
system: x86_64-darwin | ||
- os: [self-hosted, macOS, ARM64] | ||
continue-on-error: true | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
@@ -33,56 +30,39 @@ jobs: | |
|
||
steps: | ||
|
||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/[email protected] | ||
if: runner.os == 'Linux' | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB. Currently we don't seem to need | ||
# this extra disk space | ||
tool-cache: false | ||
|
||
# we might turn some of those off to trade CI time for less space saving | ||
# if this step turns out to be too slow | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: true | ||
swap-storage: true | ||
|
||
- name: Checking out the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Installing Nix | ||
uses: cachix/install-nix-action@v30 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
accept-flake-config = true | ||
- name: Install cachix | ||
id: install_cachix | ||
run: | | ||
set -euo pipefail | ||
cachix_path="$(nix build --print-out-paths --inputs-from . nixpkgs#cachix.bin)" | ||
echo "cachixBin=${cachix_path}/bin/cachix" >> "$GITHUB_OUTPUT" | ||
- name: Setup Cachix | ||
uses: cachix/cachix-action@v15 | ||
with: | ||
cachixBin: ${{ steps.install_cachix.outputs.cachixBin }} | ||
name: tweag-nickel | ||
authToken: '${{ secrets.CACHIX_TWEAG_NICKEL_AUTH_TOKEN }}' | ||
skipAddingSubstituter: true | ||
|
||
- name: Run all checks | ||
run: | | ||
# see https://github.com/NixOS/nix/issues/8949 for why we redirect to | ||
# an output file. Everything else is just capturing the error code | ||
# while still printing the logs | ||
set +e | ||
nix flake check --print-build-logs > logs 2>&1 | ||
nix flake check --accept-flake-config --print-build-logs > logs 2>&1 | ||
errcode=$? | ||
cat logs | ||
exit $errcode | ||
- name: Typecheck benchmarks | ||
run: find core/benches -type f -name "*.ncl" -print0 | xargs -0 -I file nix run . -- typecheck file | ||
run: nix shell --inputs-from . .#nickel-lang-cli nixpkgs#findutils --command find core/benches -type f -name "*.ncl" -exec nickel typecheck '{}' \; | ||
|
||
build-and-test-windows: | ||
name: "build-and-test (windows-latest, stable)" | ||
|
This file was deleted.
Oops, something went wrong.