1# Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
2#
3# Licensed under the Apache License 2.0 (the "License").  You may not use
4# this file except in compliance with the License.  You can obtain a copy
5# in the file LICENSE in the source distribution or at
6# https://www.openssl.org/source/license.html
7
8name: Provider compat
9on: [push]
10
11permissions:
12  contents: read
13
14jobs:
15  fips-provider-30:
16    runs-on: ubuntu-latest
17    steps:
18      - name: create build dirs
19        run: |
20          mkdir ./build
21          mkdir ./build-3.0
22          mkdir ./source
23          mkdir ./source-3.0
24      - uses: actions/checkout@v2
25        with:
26          path: source
27      - name: config current
28        run: ../source/config enable-shared enable-fips
29        working-directory: ./build
30      - name: config dump
31        run: ./configdata.pm --dump
32        working-directory: ./build
33      - name: make
34        run: make -s -j4
35        working-directory: ./build
36      - uses: actions/checkout@v2
37        with:
38          repository: openssl/openssl
39          ref: openssl-3.0
40          path: source-3.0
41      - name: config 3.0
42        run: ../source-3.0/config enable-shared enable-fips
43        working-directory: ./build-3.0
44      - name: config 3.0 dump
45        run: ./configdata.pm --dump
46        working-directory: ./build-3.0
47      - name: make fips provider
48        run: make -s -j4 build_modules
49        working-directory: ./build-3.0
50      - name: copy the provider
51        run: |
52          cp -a build-3.0/providers/fips.so build/providers/fips.so
53      - name: make test
54        run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
55        working-directory: ./build
56
57  fips-provider-master:
58    runs-on: ubuntu-latest
59    steps:
60      - name: create build dirs
61        run: |
62          mkdir ./build
63          mkdir ./build-3.0
64          mkdir ./source
65          mkdir ./source-3.0
66      - uses: actions/checkout@v2
67        with:
68          repository: openssl/openssl
69          ref: openssl-3.0
70          path: source-3.0
71      - name: config 3.0
72        run: ../source-3.0/config enable-shared enable-fips
73        working-directory: ./build-3.0
74      - name: config 3.0 dump
75        run: ./configdata.pm --dump
76        working-directory: ./build-3.0
77      - name: make 3.0
78        run: make -s -j4
79        working-directory: ./build-3.0
80      - uses: actions/checkout@v2
81        with:
82          path: source
83      - name: config current
84        run: ../source/config enable-shared enable-fips
85        working-directory: ./build
86      - name: config dump
87        run: ./configdata.pm --dump
88        working-directory: ./build
89      - name: make fips provider
90        run: make -s -j4 build_modules
91        working-directory: ./build
92      - name: copy the provider
93        run: |
94          cp -a build/providers/fips.so build-3.0/providers/fips.so
95      - name: make test 3.0
96        run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
97        working-directory: ./build-3.0
98