forked from nasa/cFS
-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (111 loc) · 3.65 KB
/
build-cfs-rtems4.11.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
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
name: Build and Test rtems 4.11 [OMIT_DEPRECATED=true]
# Run every time a new commit pushed or for pull requests
on:
push:
pull_request:
env:
OMIT_DEPRECATED: true
CTEST_OUTPUT_ON_FAILURE: true
# Force bash to apply pipefail option so pipeline failures aren't masked
defaults:
run:
shell: bash
jobs:
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
check-for-duplicates:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
build-cfs:
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
name: Build
runs-on: ubuntu-20.04
container: ghcr.io/core-flight-system/qemu-rtems-4-11:latest
strategy:
fail-fast: false
matrix:
buildtype: [debug, release]
# Set the type of machine to run on
env:
BUILDTYPE: ${{ matrix.buildtype }}
# Set home to where rtems is located
HOME: /root
steps:
# Check out the cfs bundle
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
# Setup the build system
- name: Copy Files
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
- name: Make Prep
run: make SIMULATION=i686-rtems4.11 prep
- name: Make
run: make
test-cfs:
name: Test
runs-on: ubuntu-20.04
container: ghcr.io/core-flight-system/qemu-rtems-4-11:latest
needs: build-cfs
strategy:
fail-fast: false
matrix:
buildtype: [debug, release]
# Set the type of machine to run on
env:
BUILDTYPE: ${{ matrix.buildtype }}
ENABLE_UNIT_TESTS: true
# Set home to where rtems is located
HOME: /root
# Disable mcopy check otherwise disk image build fails
MTOOLS_SKIP_CHECK: 1
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
# Setup the build system
- name: Copy Files
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
- name: Make
run: |
make SIMULATION=i686-rtems4.11 prep
make install
- name: Test
#run: .github/scripts/qemu_test.sh && .github/scripts/log_failed_tests.sh
run: make O=build SKIP_NET_TESTS=true RTEMS_VERSION=i686-rtems4.11 -f .github/scripts/rtems-test.mk all_tests -k
- name: Output Failed Tests
# Runs only if a previous step has failed
if: failure()
run: |
# Check if failed-tests is empty or not
if [ -s ./build/exe/cpu1/failed-tests.log ]; then
echo "Failing tests found:"
cat ./build/exe/cpu1/failed-tests.log
fi
# Always archive test logs
- name: Archive cFS Test Artifacts
uses: actions/upload-artifact@v4
# Runs even if previous steps have failed
if: always()
with:
name: cFS-rtems-log-summary-${{ matrix.buildtype }}
path: ./build/exe/cpu1/*.log