Skip to content

Commit

Permalink
Experiment: use Tweag's self-hosted runners (#2037)
Browse files Browse the repository at this point in the history
* 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 <yuriy.taraday@tweag.io>
  • Loading branch information
yannham and YorikSar authored Oct 9, 2024
1 parent 85d9f27 commit 35c98d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 47 deletions.
46 changes: 13 additions & 33 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -33,56 +30,39 @@ jobs:

steps:

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
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)"
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/deploy-preview.yml

This file was deleted.

0 comments on commit 35c98d1

Please sign in to comment.