@@ -13,33 +13,34 @@ jobs:
13
13
runs-on : ubuntu-latest
14
14
steps :
15
15
- uses : actions/checkout@v2
16
- - name : make library
16
+ - name : Make library
17
17
run : |
18
18
git clone https://github.com/P-H-C/phc-winner-argon2.git argon2_library
19
19
cd argon2_library
20
20
make
21
- - name : push compiled library
21
+ - name : Copy Compiled Library
22
22
run : |
23
23
mkdir -p lib/src/blobs/
24
24
cp argon2_library/libargon2.so.1 lib/src/blobs/libargon2-linux.so
25
+ - name : Check if there are changes
26
+ id : changes
27
+ uses :
UnicornGlobal/[email protected]
28
+ - name : Push if Changed
29
+ if : steps.changes.outputs.changed == 1
30
+ run : |
25
31
git config user.name "Github Actions"
26
32
git config user.email "[email protected] "
27
- if git diff-index --quiet HEAD
28
- then
29
- echo "No Changes. Done"
30
- else
31
- git add -f lib/src/blobs/libargon2-linux.so
32
- git commit -m "Create Native Library for Linux"
33
- git push origin main
34
- fi
33
+ git add -f lib/src/blobs/libargon2-linux.so
34
+ git commit -m "Create Native Library for Linux"
35
+ git push origin main
35
36
mac-build :
36
37
runs-on : macos-latest
37
38
needs : linux-build
38
39
steps :
39
40
- uses : actions/checkout@v2
40
41
- name : Get Updated Changes
41
42
run : git pull origin main
42
- - name : make library
43
+ - name : Make & Copy Library
43
44
run : |
44
45
git clone https://github.com/P-H-C/phc-winner-argon2.git argon2_library
45
46
cd argon2_library
@@ -49,19 +50,19 @@ jobs:
49
50
CFLAGS=--target=arm64-apple-macos11 make OPTTARGET=aarch64
50
51
mv libargon2.1.dylib libargon2.1-arm64.dylib
51
52
lipo -create libargon2.1-x86_64.dylib libargon2.1-arm64.dylib -output libargon2.1.dylib
52
- - name : copy and push library
53
- run : |
53
+ cd ..
54
54
cp argon2_library/libargon2.1.dylib lib/src/blobs/libargon2-darwin.dylib
55
+ - name : Check if there are changes
56
+ id : changes
57
+ uses :
UnicornGlobal/[email protected]
58
+ - name : Push if Changed
59
+ if : steps.changes.outputs.changed == 1
60
+ run : |
55
61
git config user.name "Github Actions"
56
62
git config user.email "[email protected] "
57
- if git diff-index --quiet HEAD
58
- then
59
- echo "No Changes. Done"
60
- else
61
- git add -f lib/src/blobs/libargon2-darwin.dylib
62
- git commit -m "Create Native Library for Mac"
63
- git push origin main
64
- fi
63
+ git add -f lib/src/blobs/libargon2-darwin.dylib
64
+ git commit -m "Create Native Library for Mac"
65
+ git push origin main
65
66
windows-build :
66
67
runs-on : windows-latest
67
68
needs : [linux-build, mac-build]
@@ -81,16 +82,16 @@ jobs:
81
82
git clone https://github.com/P-H-C/phc-winner-argon2.git argon2_library
82
83
CD argon2_library
83
84
msbuild Argon2.sln /p:Configuration=ReleaseStatic
84
- - name : copy and push library
85
+ - name : Copy Library
86
+ run : Copy-Item “argon2_library\vs2015\build\Argon2OptDll.dll” -Destination “lib\src\blobs\libargon2-win.dll”
87
+ - name : Check if there are changes
88
+ id : changes
89
+ uses :
UnicornGlobal/[email protected]
90
+ - name : Push if Changed
91
+ if : steps.changes.outputs.changed == 1
85
92
run : |
86
- Copy-Item “argon2_library\vs2015\build\Argon2OptDll.dll” -Destination “lib\src\blobs\libargon2-win.dll”
87
93
git config user.name "Github Actions"
88
94
git config user.email "[email protected] "
89
- if git diff-index --quiet HEAD
90
- then
91
- echo "No Changes. Done"
92
- else
93
- git add -f lib\src\blobs\libargon2-win.dll
94
- git commit -m "Create Native Library for Windows"
95
- git push origin main
96
- fi
95
+ git add -f lib\src\blobs\libargon2-win.dll
96
+ git commit -m "Create Native Library for Windows"
97
+ git push origin main
0 commit comments