Skip to content

Refactor trust atom creation and querying #575

Refactor trust atom creation and querying

Refactor trust atom creation and querying #575

Workflow file for this run

name: Checks
on: [push, pull_request]
jobs:
checks:
timeout-minutes: 45
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11]
fail-fast: false
steps:
- name: Fetch source code
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo/bin/
.cargo/registry/index/
.cargo/registry/cache/
.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Setup Xcode version
if: ${{ runner.os == 'macOS' }}
uses: maxim-lobanov/[email protected]
with:
xcode-version: latest-stable
- name: Check macOS version
if: ${{ runner.os == 'macOS' }}
run: sw_vers
- name: Set up nix
uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-21.05
extra_nix_config: |
substituters = https://cache.nixos.org https://cache.holo.host https://holochain.cachix.org https://holochain-ci.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE= cache.holo.host-2:ZJCkX3AUYZ8soxTLfTb60g+F3MkWD7hkH9y8CgqwhDQ= holochain.cachix.org-1:fWOoSTrRQ8XipZim7a8LDqFAE8aqcGnG4E7G8NAJlgY= holochain-ci.cachix.org-1:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8=
- name: Cache nix with Cachix
uses: cachix/cachix-action@v10
with:
name: holochain # this is our cachix cache; we can write to it as well as read
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# with:
# name: holochain-ci # this is the official holochain-ci; not always up to date; read-only for us
- name: Inspect nix.conf
run: cat ~/.config/nix/nix.conf
- name: Install recent bash, and set as NIX_BUILD_SHELL # needed by macos, which has an older bash incompatible with nix
if: ${{ runner.os == 'macOS' }}
run: echo "NIX_BUILD_SHELL=$(nix-build -A bashInteractive '<nixpkgs>')/bin/bash" >> $GITHUB_ENV
- name: Prepare Nix environment
run: nix-shell --command "echo Completed"
- run: nix-shell --pure --run 'bin/run build'
- run: nix-shell --pure --run 'bin/run test'
- run: nix-shell --pure --run 'bin/run clippy'
- name: Slack notify of failure
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,ref,workflow,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_CI }}
if: failure()