-
Notifications
You must be signed in to change notification settings - Fork 34
78 lines (75 loc) · 2.86 KB
/
main.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
name: client-sdk-fidoiot-build
on:
workflow_dispatch:
push:
branches: [master, '*rel']
pull_request:
branches: [master, '*rel']
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: scm checkout
uses: actions/checkout@v3
- name: Build docker image
run: docker build -t client-sdk -f '.github/Dockerfile' .
- name: run Docker container
run: docker run -v $PWD:/build_dir/fdoout/client-sdk/ client-sdk:latest
- name: tar client-sdk binaries
run: |
mkdir client-sdk-binaries && cd client-sdk-binaries
cp -r ../x86_ecdsa* ../tpm_ecdsa* ../cse_ecdsa* .
mkdir utils
cp ../utils/tpm_make_ready_ecdsa.sh ../utils/install_tpm_libs*.sh ../utils/keys_gen.sh utils/
cd .. && tar -cvzf client-sdk-binaries.tar.gz client-sdk-binaries
- name: checkout test-fidoiot
uses: actions/checkout@v3
with:
repository: fido-device-onboard/test-fidoiot
ref: master
path: test-fidoiot
- name: Download pri-fidoiot artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v2
with:
name: demo.tar.gz
repo: fido-device-onboard/pri-fidoiot
workflow: main.yaml
path: test-fidoiot/binaries/pri-fidoiot/
search_artifacts: true
- name: Add host to /etc/hosts
run: |
sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts
- name: Smoke Test
run : |
mkdir -p test-fidoiot/binaries/client-sdk-fidoiot
tar -xvzf test-fidoiot/binaries/pri-fidoiot/demo.tar.gz
cp -r demo/* test-fidoiot/binaries/pri-fidoiot/
cp x86_ecdsa256_gcm_bin/linux-client test-fidoiot/binaries/client-sdk-fidoiot/
cp -r x86_ecdsa256_gcm_bin/data test-fidoiot/
bash utils/install_openssl_curl.sh -i -v 3.0.8
bash utils/keys_gen.sh test-fidoiot
cd test-fidoiot/binaries/pri-fidoiot/scripts
bash demo_ca.sh
bash web_csr_req.sh
bash user_csr_req.sh
bash keys_gen.sh
chmod -R 777 secrets/
cp -r service.env secrets/ ../aio/
cp -r secrets/ ../db/
sed -i '/<security-constraint>/,/<.security-constraint>/d' ../aio/WEB-INF/web.xml
sed -i '/^innodb/d' ../db/custom/config-file.cnf
cd ${{ github.workspace }}/test-fidoiot/data
sed -i 's/8039/8080/g' manufacturer_addr.bin
cd ${{ github.workspace }}/test-fidoiot
export TEST_DIR=`pwd`
mvn clean test -Dgroups=fdo_clientsdk_smoketest
- name: archive artifacts
uses: actions/upload-artifact@v3
with:
name: client-sdk-binaries.tar.gz
path: client-sdk-binaries.tar.gz
retention-days: 5
if: github.event_name != 'pull_request'