[RFC007] Migrate the parser to the new AST #6032
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
name: Continuous integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
strategy: | |
matrix: | |
include: | |
- os: [self-hosted, Linux, X64] | |
name: linux | |
- os: [self-hosted, macOS, ARM64] | |
name: macos | |
continue-on-error: true | |
name: build-and-test (${{ matrix.name }}) | |
runs-on: ${{ matrix.os }} | |
# The `== true` makes it work wether continue-on-error has been defined or not. | |
continue-on-error: ${{ matrix.continue-on-error == true }} | |
steps: | |
- name: Checking out the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- 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 --accept-flake-config --print-build-logs > logs 2>&1 | |
errcode=$? | |
cat logs | |
exit $errcode | |
- name: Typecheck benchmarks | |
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)" | |
runs-on: windows-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Build | |
run: cargo build --all-targets --package nickel-lang-* | |
- name: Test | |
run: cargo test --package nickel-lang-* |