forked from IBM/OpenJCEPlus
-
Notifications
You must be signed in to change notification settings - Fork 2
127 lines (126 loc) · 5.21 KB
/
github-actions.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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
###############################################################################
#
# Copyright IBM Corp. 2023
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution.
#
###############################################################################
name: GitHub Actions OpenJCEPlus
run-name: ${{ github.actor }} is building and testing OpenJCEPlus 🚀
on: [pull_request]
jobs:
Build-Test-OpenJCEPlus:
name: Build and Test ${{ matrix.os }}.
runs-on: ${{ matrix.os }}
permissions:
checks: write # Needed to publish a check from the Publish Test Report step below.
contents: read # Needed to read the contents of the github repo and clone.
strategy:
matrix:
# "windows-2022" os builds have been disabled since Open Crypto Kit does not have builds available for windows.
os: [ubuntu-22.04]
include:
- os: ubuntu-22.04
gskit_dir: amd64
gskit_lib_name: libjgsk8iccs_64.so
target_lib_bin_dir: jgskit-xa-64
github_actions_runner_root: /
#- os: windows-2022
# gskit_dir: windows_x86_64
# gskit_lib_name: jgsk8iccs_64.dll
# github_actions_runner_root: \
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server."
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
tree ${{ github.workspace }}
# - name: Set up Visual Studio shell
# uses: egor-tensin/vs-shell@v2
# with:
# arch: x64
- name: 'Checkout Open Cryptography Kit C'
uses: actions/checkout@v4
with:
repository: IBM/OpenCryptographyKitC
ref: 411a80674cedc6d4bdb9d808df341c7a29170699 # main branch on Aug 11th 2024.
path: ${{ github.workspace }}/OpenCryptographyKitC
- name: Compile Open Cryptography Kit C
run: |
cd ${{ github.workspace }}/OpenCryptographyKitC/icc
make -k OPSYS=AMD64_LINUX CONFIG=release create_all
export LD_LIBRARY_PATH=${{ github.workspace }}/OpenCryptographyKitC/openssl-1.1.1/
make -k OPSYS=AMD64_LINUX CONFIG=release all
make -k OPSYS=AMD64_LINUX CONFIG=release iccpkg
make -k OPSYS=AMD64_LINUX CONFIG=release show_config
cd ..
cd iccpkg
make -k OPSYS=AMD64_LINUX CONFIG=release all
cd ${{ github.workspace }}
- name: Extract OCK SDK and Binary Tar File
run: |
mkdir ${{ github.workspace }}/OCK
cd ${{ github.workspace }}/OCK
cp ${{ github.workspace }}/OpenCryptographyKitC/package/jgsk_crypto.tar .
cp ${{ github.workspace }}/OpenCryptographyKitC/package/jgsk_crypto_sdk.tar .
ls -al
tree
tar -xvf jgsk_crypto.tar
tar -xvf jgsk_crypto_sdk.tar
mkdir jgsk_sdk/lib64
cp ${{ matrix.gskit_lib_name }} jgsk_sdk/lib64
- name: Setup Semeru JDK
uses: actions/setup-java@v4
with:
java-version: '23.0.0+37'
distribution: 'semeru'
architecture: 'x64'
# Uncomment to capture all files in the runner for debugging purposes.
# - name: List Files In Entire Runner
# run: |
# tree ${{ matrix.github_actions_runner_root }}
- name: Execute Maven Install Target And OpenJCEPlus Provider Tests
run: >
mvn
--batch-mode
'-Dock.library.path=${{ github.workspace }}/OCK/'
-Dtest='
ibm.jceplus.junit.openjceplus.TestAll,
ibm.jceplus.junit.TestMemStressAll,
ibm.jceplus.junit.TestMultithread,
ibm.jceplus.junit.openjceplus.integration.TestAll
'
install
env:
GSKIT_HOME: ${{ github.workspace }}/OCK/jgsk_sdk
#- name: List Files In The Entire Workspace
# run: |
# tree ${{ github.workspace }}
- name: Archive openjceplus.jar
uses: actions/upload-artifact@v4
with:
name: openjceplus.jar
path: target/openjceplus.jar
- name: Archive openjceplus-tests.jar
uses: actions/upload-artifact@v4
with:
name: openjceplus-tests.jar
path: target/openjceplus-tests.jar
- name: Archive libjgskit.so
uses: actions/upload-artifact@v4
with:
name: libjgskit.so
path: target/${{ matrix.target_lib_bin_dir }}/libjgskit.so
- name: Archive OpenJCEPlus Assemblies
uses: actions/upload-artifact@v4
with:
name: openjceplus-assemblies.zip
path: target/openjceplus-assemblies.zip
- run: echo "🍏 This job's status is ${{ job.status }}."