diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 48aeb50b9..b0478f9fd 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -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,42 +30,25 @@ 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: | @@ -76,13 +56,13 @@ jobs: # 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)" diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml deleted file mode 100644 index cc57ad27f..000000000 --- a/.github/workflows/deploy-preview.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Deploy preview -on: - pull_request: - merge_group: - -jobs: - deploy: - uses: tweag/nickel-lang.org/.github/workflows/deploy.yml@master - with: - production_deploy: false - secrets: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_TWEAG_NICKEL_AUTH_TOKEN }} - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}