-
Notifications
You must be signed in to change notification settings - Fork 30
66 lines (57 loc) · 1.9 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
65
66
name: PKCS11 Tests
on: [push, pull_request]
jobs:
build:
name: Waiting for build
runs-on: ubuntu-latest
steps:
- name: Wait for build
uses: lewagon/wait-on-check-action@v1.3.4
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/wait-on-check-action@v1.3.4
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@v4
- name: Retrieve JSS images
uses: actions/cache@v4
with:
key: jss-images-${{ github.sha }}
path: jss-images.tar
- name: Load JSS images
run: docker load --input jss-images.tar
- name: Set up JSS container
run: |
tests/bin/runner-init.sh \
--image=jss-builder \
--hostname=jss.example.com \
jss
- name: Check PKCS11 constants
run: |
# generate new PKCS11Constants.java from NSS header files
docker exec jss $SHARED/tools/build_pkcs11_constants.py \
--pkcs11t /usr/include/nss3/pkcs11t.h \
--pkcs11n /usr/include/nss3/pkcs11n.h \
-o PKCS11Constants.java \
--verbose
# compare existing PKCS11Constants.java with the new one
docker exec jss diff \
$SHARED/base/src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java \
PKCS11Constants.java