-
Notifications
You must be signed in to change notification settings - Fork 30
64 lines (55 loc) · 1.87 KB
/
pkcs11-tests.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
name: PKCS11 Tests
on: [push, pull_request]
jobs:
build:
name: Waiting for build
runs-on: ubuntu-latest
steps:
- name: Wait for build
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'Building JSS'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 30
if: github.event_name == 'push'
- name: Wait for build
uses: lewagon/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: 'Building JSS'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 30
if: github.event_name == 'pull_request'
pkcs11-constants-test:
name: Testing PKCS11 Constants
needs: build
runs-on: ubuntu-latest
env:
SHARED: /tmp/workdir/jss
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Retrieve jss-runner image
uses: actions/cache@v3
with:
key: jss-runner-${{ github.sha }}
path: jss-runner.tar
- name: Load jss-runner image
run: docker load --input jss-runner.tar
- name: Run container
run: |
IMAGE=jss-runner \
NAME=jss \
HOSTNAME=jss.example.com \
tests/bin/runner-init.sh
- name: Install dependencies
run: docker exec jss dnf install -y nss-util-devel python3 java-devel
- name: Generate PKCS11 constants
run: |
docker exec jss python3 $SHARED/tools/build_pkcs11_constants.py \
--pkcs11t /usr/include/nss3/pkcs11t.h \
--pkcs11n /usr/include/nss3/pkcs11n.h \
-o PKCS11Constants.java \
--verbose
docker exec jss diff PKCS11Constants.java $SHARED/base/src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java