Skip to content

:nail-care:

:nail-care: #9

Workflow file for this run

# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
# Our desired pipeline using only a Nix shell environment
name: Check and build
on:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
branches:
- main
jobs:
check_nix:
name: Check Ray tracing
runs-on: ubuntu-22.04
steps:
- name: git checkout
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
# Nix-specific logic begins here
- name: Check Rust formatting
run: |
nix develop --command \
cargo fmt --check
- name: Audit Rust code
run: |
nix develop --command \
cargo-deny check
- name: Check spelling
run: |
nix develop --command \
codespell \
--skip target,.git \
--ignore-words-list crate
build_and_test_nix:
name: Test and build Ray Tracer
needs: check_nix
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
runs-on: ubuntu-22.04
steps:
- name: git checkout
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Set up Rust cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ray-tracer-${{ hashFiles('**/Cargo.lock') }}
- name: Test
run: |
nix develop --command \
cargo test