-
Notifications
You must be signed in to change notification settings - Fork 1.8k
149 lines (142 loc) · 4.79 KB
/
Copy pathref.yml
File metadata and controls
149 lines (142 loc) · 4.79 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Build, integration test, and unit test verification for the F' Ref deployment.
name: "Ref"
on:
push:
branches: [devel, release/**]
pull_request:
branches: [devel, release/**]
paths-ignore:
- "docs/**"
- "**.md"
- ".github/actions/spelling/**"
- ".github/ISSUE_TEMPLATE/**"
- ".github/agents/**"
workflow_dispatch:
inputs:
runner:
description: "Runner label (e.g. ubuntu-22.04, macos-latest)"
required: false
default: ""
jobs:
description: "Parallel job count: a number, 'random' (1-32), or empty to omit -j"
required: false
default: ""
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'devel') && !contains(github.ref, 'release/') }}
permissions:
contents: read
jobs:
build:
name: "Build [${{ matrix.runner }}]"
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
jobs: "random"
- runner: macos-latest
jobs: "2"
timeout-minutes: 30
runs-on: ${{ github.event.inputs.runner || matrix.runner }}
steps:
- name: "Checkout F' Repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: "Setup F' Tools"
uses: nasa/fprime-actions/setup@devel
with:
location: ${{ github.workspace }}
- name: "Build Ref"
uses: nasa/fprime-actions/build@devel
with:
working-directory: "TestDeploymentsProject"
jobs: ${{ github.event.inputs.jobs || matrix.jobs }}
- name: "Archive Build Artifacts"
uses: actions/upload-artifact@v7
with:
name: ref-build-artifacts-${{ matrix.runner }}
path: TestDeploymentsProject/build-artifacts/
retention-days: 1
integration-tests:
name: "Integration Tests [${{ matrix.runner }}]"
needs: build
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
- runner: macos-latest
timeout-minutes: 30
runs-on: ${{ github.event.inputs.runner || matrix.runner }}
steps:
- name: "Checkout F' Repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: "Setup F' Tools"
uses: nasa/fprime-actions/setup@devel
with:
location: ${{ github.workspace }}
# Upgrade GDS to a matching pr-xxxx branch if it exists; never fall back to devel
- name: "Upgrade fprime-gds to pr-xxxx (if it exists)"
if: github.event_name == 'pull_request'
uses: nasa/fprime-actions/upgrade-package@devel
with:
repository: nasa/fprime-gds
pr-branch-only: true
- name: "Download Build Artifacts"
uses: actions/download-artifact@v8
with:
name: ref-build-artifacts-${{ matrix.runner }}
path: TestDeploymentsProject/build-artifacts/
- name: "Make binary executable"
run: chmod +x TestDeploymentsProject/build-artifacts/*/Ref/bin/Ref
- name: "Install valgrind"
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y valgrind
- name: "Install coreutils (macOS)"
if: runner.os == 'macOS'
run: brew install coreutils
- name: "Integration Tests"
uses: nasa/fprime-actions/run-integration-tests@devel
with:
gds-working-directory: "TestDeploymentsProject"
test-working-directory: "TestDeploymentsProject"
binary: "build-artifacts/*/Ref/bin/Ref"
gds-args: "--dictionary build-artifacts/*/Ref/dict/RefTopologyDictionary.json"
pytest-args: "Ref --deployment-config ${{ github.workspace }}/TestDeploymentsProject/Ref/test/int/int_config.json"
valgrind: ${{ runner.os == 'Linux' && 'true' || 'false' }}
unit-tests:
name: "UTs [${{ matrix.runner }}]"
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
jobs: "random"
- runner: macos-latest
jobs: "2"
timeout-minutes: 30
runs-on: ${{ github.event.inputs.runner || matrix.runner }}
steps:
- name: "Checkout F' Repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: "Setup F' Tools"
uses: nasa/fprime-actions/setup@devel
with:
location: ${{ github.workspace }}
- name: "Run Unit Tests"
uses: nasa/fprime-actions/run-unit-tests@devel
with:
working-directory: "TestDeploymentsProject"
generate-args: "-DFPRIME_ENABLE_FRAMEWORK_UTS=OFF"
jobs: ${{ github.event.inputs.jobs || matrix.jobs }}