Skip to content

Commit 20fa1c7

Browse files
committed
Test building of shared library too
1 parent cd29471 commit 20fa1c7

3 files changed

Lines changed: 29 additions & 3 deletions

File tree

.github/workflows/decrypt.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,13 @@ jobs:
2626
ls REFPROP
2727
env:
2828
REFPROP_GPG_PASSPHRASE: ${{ secrets.REFPROP_GPG_PASSPHRASE }}
29+
30+
- name: Test building of REFPROP shared library
31+
shell: bash
32+
run: |
33+
chmod +x decrypt.sh
34+
./decrypt.sh
35+
36+
env:
37+
REFPROP_GPG_PASSPHRASE: ${{ secrets.REFPROP_GPG_PASSPHRASE }}
2938

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
Following the instructions from https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions, a zip file called ``REFPROP.zip`` is placed in this repo containing the folders ``MIXTURES``, ``FLUIDS``, and ``FORTRAN``
1+
# Encrypted REFPROP
2+
3+
Following the instructions from https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions, a zip file called ``REFPROP.zip`` is placed in this repo containing the folders ``MIXTURES``, ``FLUIDS``, and ``FORTRAN``.
24

35
## Preparation
46

57
On windows, to get gpg via chocolatey:
68
```
79
choco install gpg4win
810
```
9-
, then restart restart the shell.
11+
, then restart restart the shell. Other platforms have ``gpg`` available by default
1012

1113
## Encryption
1214

@@ -16,4 +18,6 @@ gpg --symmetric --cipher-algo AES256 REFPROP.zip
1618
```
1719
which generates the encrypted file ``REFPROP.zip.gpg``. Generate an uncrackable password, and store that password somewhere safe. That will be used to decrypt the source
1820

19-
##
21+
## Actions setup
22+
23+
Add a repository secret called ``REFPROP_GPG_PASSPHRASE`` in github actions with the contents of the password you generated in the previous step. The action in this repository will test the decryption and print out the contents of the zip file.

decrypt.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
# --batch to prevent interactive command
4+
# --yes to assume "yes" for questions
5+
gpg --quiet --batch --yes --decrypt --passphrase="$REFPROP_GPG_PASSPHRASE" --output REFPROP.zip REFPROP.zip.gpg
6+
unzip REFPROP.zip -d REFPROP
7+
8+
apt-get -y -m update && DEBIAN_FRONTEND=noninteractive apt-get install -y cmake g++ dos2unix
9+
10+
git clone https://github.com/usnistgov/REFPROP-cmake
11+
cd REFPROP-cmake
12+
cmake -B bld -S . -DCMAKE_BUILD_TYPE=Release -DREFPROP_FORTRAN_PATH=`pwd`/../REFPROP/FORTRAN
13+
cmake --build bld --config Release

0 commit comments

Comments
 (0)