forked from inet-framework/inet
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (91 loc) · 3.27 KB
/
Copy pathbuild-and-tests.yml
File metadata and controls
97 lines (91 loc) · 3.27 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
name: Build and tests
on:
# schedule:
# - cron: "0 21 * * 1-5" # https://crontab.guru/#0_21_*_*_1-5 : "At 21:00 on every day-of-week from Monday through Friday."
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
# nothing
jobs:
build-native:
runs-on: ubuntu-latest
strategy:
matrix:
mode: ["debug", "release"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Pull Docker image
run: docker pull omnetpp/travis-inet:6.0-220428
- name: Build (native)
run: |
docker run -i --env TARGET_PLATFORM=linux --env MODE=${{ matrix.mode }} --env GITHUB_WORKSPACE \
-v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE \
omnetpp/travis-inet:6.0-220428 /bin/bash $GITHUB_WORKSPACE/_scripts/github/github-job-build.sh
- uses: actions/upload-artifact@v2
with:
name: libinet-so
path: ${{ github.workspace }}/src/libINET*.so
build-cross:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["windows", "macosx"]
mode: ["debug", "release"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Pull Docker image
run: docker pull omnetpp/travis-inet:6.0-220428
- name: Build (cross)
run: |
docker run -i --env TARGET_PLATFORM=${{ matrix.target }} --env MODE=${{ matrix.mode }} --env GITHUB_WORKSPACE \
-v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE \
omnetpp/travis-inet:6.0-220428 /bin/bash $GITHUB_WORKSPACE/_scripts/github/github-job-build.sh
fingerprints:
needs: build-native
runs-on: ubuntu-latest
strategy:
matrix:
mode: ["debug", "release"]
split: [0, 1, 2, 3]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: libinet-so
path: ${{ github.workspace }}/src/
- name: Pull Docker image
run: docker pull omnetpp/travis-inet:6.0-220428
- name: Fingerprint tests
run: |
docker run -i --env MODE=${{ matrix.mode }} --env GITHUB_WORKSPACE --env SPLIT_N=4 --env SPLIT_I=${{ matrix.split }} \
-v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE \
omnetpp/travis-inet:6.0-220428 /bin/bash $GITHUB_WORKSPACE/_scripts/github/github-job-fingerprints.sh
other-tests:
needs: build-native
runs-on: ubuntu-latest
strategy:
matrix:
# TODO: add debug/release mode when the runtest scripts can switch between
# MODEs or executables based on command line arguments or envvars
testdir: ["module", "unit", "packet", "queueing", "protocol"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: libinet-so
path: ${{ github.workspace }}/src/
- name: Pull Docker image
run: docker pull omnetpp/travis-inet:6.0-220428
- name: Run ${{ matrix.testdir }} tests
run: |
docker run -i --env MODE=debug --env GITHUB_WORKSPACE --env TESTDIR=${{ matrix.testdir }} \
-v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE \
omnetpp/travis-inet:6.0-220428 /bin/bash $GITHUB_WORKSPACE/_scripts/github/github-job-other-tests.sh