ofborg/.github/workflows/ci.yml
Andreas Rammhold 804bb34181 Move from crate2nix to buildRustPackage based on the Cargo.lock
Nixpkgs recently gained the ability to fetch cargo dependencies based on
the Cargo.lock file which means we can get rid of all the generated Nix
expressions. The only downside to that is that we are now building
everything in one go and do not have the semi-incremental builds as we
had before.
2021-07-07 12:19:54 -07:00

34 lines
811 B
YAML

name: CI
on:
push:
branches: [released]
pull_request:
jobs:
checkPhase:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Set up git
run: |
git config --global user.email "ofborg@example.com"
git config --global user.name "ofborg"
- name: checkPhase
run: nix-shell --pure --run "cargo test"
nix-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: nix-build
run: nix-build -A ofborg.rs -A ofborg.php