-
Notifications
You must be signed in to change notification settings - Fork 5
108 lines (90 loc) · 3.47 KB
/
tests.yaml
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
name: Unit and Functional Tests
on:
workflow_dispatch:
push:
branches: [trunk]
pull_request:
branches: [trunk]
permissions: # added using https://github.com/step-security/secure-repo
contents: read
jobs:
unit-tests:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: build atSDK
run: |
cmake -S . -B build -DATSDK_BUILD_TESTS="unit"
cmake --build build --target all
- name: atchops Unit CTest
working-directory: build/packages/atchops/tests
run: ctest --test-dir . --output-on-failure --timeout 5
- name: atclient Unit CTest
working-directory: build/packages/atclient/tests
run: ctest --test-dir . --output-on-failure --timeout 5
functional-tests:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Load secrets
working-directory: tests/functional_tests
run: |
mkdir -p ~/.atsign/keys/
echo "${{ secrets.ATKEYS_12ALPACA }}" > ~/.atsign/keys/@12alpaca_key.atKeys
echo "${{ secrets.ATKEYS_12SNOWBOATING }}" > ~/.atsign/keys/@12snowboating_key.atKeys
- name: Install atSDK
run: |
cmake -S . -B build -DATSDK_BUILD_TESTS="func"
sudo cmake --build build --target install
- name: Build and Run Functional Tests
working-directory: build/tests/functional_tests
run: |
ctest --test-dir . -VV --timeout 90
build-examples:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install atSDK
run: |
cmake -S . -B build
sudo cmake --build build --target install
- name: Build at_talk
working-directory: examples/desktop/at_talk
run: |
cmake -S . -B build
cmake --build build
- name: Build all CRUD examples
working-directory: examples/desktop/crud
run: |
cmake -S . -B build -DTARGET_SRC=delete.c && cmake --build build
cmake -S . -B build -DTARGET_SRC=get_publickey.c && cmake --build build
cmake -S . -B build -DTARGET_SRC=get_selfkey.c && cmake --build build
cmake -S . -B build -DTARGET_SRC=get_sharedkey.c && cmake --build build
cmake -S . -B build -DTARGET_SRC=put_publickey.c && cmake --build build
cmake -S . -B build -DTARGET_SRC=put_selfkey.c && cmake --build build
cmake -S . -B build -DTARGET_SRC=put_sharedkey.c && cmake --build build
- name: Build events
working-directory: examples/desktop/events
run: |
cmake -S . -B build
cmake --build build
- name: Build pkam_authenticate
working-directory: examples/desktop/pkam_authenticate
run: |
cmake -S . -B build
cmake --build build
- name: Build REPL
working-directory: examples/desktop/repl
run: |
cmake -S . -B build
cmake --build build
- name: Build reconnection example
working-directory: examples/desktop/reconnection
run: |
cmake -S . -B build
cmake --build build --target install
- name: Build sample cmake project
working-directory: examples/desktop/sample_cmake_project
run: |
cmake -S . -B build -Datsdk="/usr/local/bin/cmake/atsdk"
cmake --build build