2020-11-11 10:48:53 +03:00
|
|
|
# Notes:
|
|
|
|
#
|
|
|
|
# jobs.<job_id>
|
|
|
|
#
|
|
|
|
# A seperate job id results in a lot of duplication of nix/cachix work.
|
|
|
|
# The build will have to download any substituted derivations from cachix
|
|
|
|
# for the steps with each distinct job id and upload built derivations to
|
|
|
|
# cachix after each job has completed, either succesfully or on failure.
|
|
|
|
#
|
|
|
|
# jobs.<job_id>.steps.run
|
|
|
|
#
|
|
|
|
# build + test are distinct as each step entry results in a collapsable title
|
|
|
|
# within the log output, which makes it easier to view failing builds or
|
|
|
|
# tests independently.
|
|
|
|
#
|
|
|
|
# jobs.<job_id>.strategy.fail-fast
|
|
|
|
#
|
|
|
|
# Set to false so developers working on vere or king-haskell can have their
|
|
|
|
# respective builds proceed without the other causing failure.
|
|
|
|
#
|
|
|
|
# shell.nix
|
|
|
|
#
|
|
|
|
# mkShell doesn't allow you to build it - so instantiate all the subshells
|
|
|
|
# defined for the individual pkg/*/shell.nix as a sanity check and to create
|
|
|
|
# some artefacts suitable for developers to pull from cachix. The top-level
|
|
|
|
# shell.nix build time is dominated by Haskell dependencies so it's built as
|
|
|
|
# part of the haskell build steps.
|
|
|
|
#
|
|
|
|
# Syntax:
|
|
|
|
#
|
|
|
|
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
|
|
|
|
|
2020-12-04 10:59:49 +03:00
|
|
|
name: build
|
2020-11-11 10:48:53 +03:00
|
|
|
|
2020-11-25 17:33:52 +03:00
|
|
|
on: [push, pull_request]
|
2020-11-11 10:48:53 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
urbit:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- { os: ubuntu-latest }
|
|
|
|
- { os: macos-latest }
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-01-13 15:33:09 +03:00
|
|
|
|
|
|
|
# We only want the extra nix config on linux, where it is necessary
|
|
|
|
# for the docker build. We don't want in on Mac, where it isn't but
|
|
|
|
# it breaks the nix install. The two `if` clauses should be mutually
|
|
|
|
# exclusive
|
|
|
|
- uses: cachix/install-nix-action@v12
|
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
system-features = nixos-test benchmark big-parallel kvm
|
|
|
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
2020-11-11 10:48:53 +03:00
|
|
|
- uses: cachix/install-nix-action@v12
|
2021-01-13 15:33:09 +03:00
|
|
|
if: ${{ matrix.os != 'ubuntu-latest' }}
|
|
|
|
|
2020-11-11 10:48:53 +03:00
|
|
|
- uses: cachix/cachix-action@v8
|
|
|
|
with:
|
2021-01-22 14:50:46 +03:00
|
|
|
name: ares
|
2020-11-11 10:48:53 +03:00
|
|
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
|
|
|
|
|
|
- run: nix-build -A urbit --arg enableStatic true
|
|
|
|
|
2020-12-04 10:59:49 +03:00
|
|
|
- if: ${{ matrix.os == 'ubuntu-latest' }}
|
2020-11-11 10:48:53 +03:00
|
|
|
run: nix-build -A urbit-tests
|
|
|
|
|
2021-01-13 15:33:09 +03:00
|
|
|
- if: ${{ matrix.os == 'ubuntu-latest' }}
|
|
|
|
run: nix-build -A docker-image
|
|
|
|
|
2020-11-11 10:48:53 +03:00
|
|
|
haskell:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- { os: ubuntu-latest }
|
|
|
|
- { os: macos-latest }
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: cachix/install-nix-action@v12
|
|
|
|
- uses: cachix/cachix-action@v8
|
|
|
|
with:
|
2021-01-22 14:50:46 +03:00
|
|
|
name: ares
|
2020-11-11 10:48:53 +03:00
|
|
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
|
|
|
|
|
|
- run: nix-build -A hs.urbit-king.components.exes.urbit-king --arg enableStatic true
|
|
|
|
- run: nix-build -A hs-checks
|
|
|
|
- run: nix-build shell.nix
|