-
Notifications
You must be signed in to change notification settings - Fork 18
60 lines (52 loc) · 1.73 KB
/
run_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Run tests
on:
# Triggers the workflow on pull request events but only for the master branch
pull_request:
branches: [ master ]
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
SUITE_REPO: "NilFoundation/crypto3"
LIB_NAME: "blueprint"
CACHE_NAME: "blueprint-job-cache"
jobs:
handle-syncwith:
if: github.event_name == 'pull_request'
name: Call Reusable SyncWith Handler
uses: NilFoundation/ci-cd/.github/workflows/reusable-handle-syncwith.yml@v1
with:
ci-cd-ref: 'v1'
secrets: inherit
build-and-test:
needs: [ handle-syncwith ]
runs-on: ["self-hosted", "aws_autoscaling"]
strategy:
fail-fast: false
steps:
# https://github.com/actions/checkout/issues/1552
- name: Clean up after previous checkout
run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*;
- name: Checkout Blueprint
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Checkout submodules to specified refs
if: inputs.submodules-refs != ''
uses: NilFoundation/ci-cd/actions/[email protected]
with:
refs: ${{ inputs.submodules-refs }}
paths: |
${{ github.workspace }}/**
!${{ github.workspace }}/
!${{ github.workspace }}/**/.git/**
# nix is taken from the cloud-init template, no need to install it.
- name: Build and run tests
env:
NIX_CONFIG: |
cores = 8
max-jobs = 4
run: |
nix build -L .?submodules=1#checks.x86_64-linux.default