-
-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathaction.yml
More file actions
56 lines (49 loc) · 1.57 KB
/
Copy pathaction.yml
File metadata and controls
56 lines (49 loc) · 1.57 KB
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
name: Build & Test
description: Shared build/test steps for all runners
inputs:
build:
required: true
coverage:
required: true
runs:
using: "composite"
steps:
- name: Setup Sharness
shell: bash
run: |
wget https://raw.githubusercontent.com/felipec/sharness/refs/tags/v1.2.1/sharness.sh
wget https://raw.githubusercontent.com/felipec/sharness/refs/tags/v1.2.1/lib-sharness/functions.sh
mv sharness.sh tests/
mkdir tests/lib-sharness
mv functions.sh tests/lib-sharness/
- name: Print versions
shell: bash
run: make versions
- name: Stage 0 - Build Stage 1
shell: bash
run: make BUILD=${{ inputs.build }} -j4
- name: Stage 1 - Print version
shell: bash
run: ./build/cabin version --verbose
- name: Stage 1 - Test
shell: bash
run: |
[[ '${{ inputs.coverage }}' == 'true' ]] && COVERAGE='--coverage'
# shellcheck disable=SC2086
./build/cabin test -vv $COVERAGE
env:
CABIN: ${{ github.workspace }}/build/cabin
- name: Stage 1 - Build Stage 2
shell: bash
run: |
[[ '${{ inputs.build }}' == 'release' ]] && RELEASE='--release'
# shellcheck disable=SC2086
./build/cabin -vv build $RELEASE
- name: Stage 2 - Print version
shell: bash
run: ./cabin-out/${{ inputs.build }}/cabin version --verbose
- name: Stage 2 - Test
shell: bash
run: ./cabin-out/${{ inputs.build }}/cabin test -vv
env:
CABIN: ${{ github.workspace }}/cabin-out/${{ inputs.build }}/cabin