-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (103 loc) · 3.56 KB
/
test.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
name: Build, Test, Deploy
run-name: CI pipeline triggered by ${{ github.actor }}
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
AFS_WINDOWS_CLANG_UPLOAD: ${{ secrets.AFS_WINDOWS_CLANG_UPLOAD }}
AFS_WINDOWS_MSVC_UPLOAD: ${{ secrets.AFS_WINDOWS_MSVC_UPLOAD }}
AFS_MACOS_CLANG_UPLOAD: ${{ secrets.AFS_MACOS_CLANG_UPLOAD }}
jobs:
Compile-Windows-MSVC:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run: |
mkdir dist/soot-dem/bin
mkdir cmake-build
cd cmake-build
cmake ..
cmake --build . --config Release
move ./Release/aggregate_deposition.exe ../dist/soot-dem/bin/
move ./Release/afm_necking_fraction.exe ../dist/soot-dem/bin/
move ./Release/restructuring.exe ../dist/soot-dem/bin/
cd ..
$compress = @{
Path = "dist/soot-dem/"
CompressionLevel = "Fastest"
DestinationPath = "soot-dem-windows-msvc-x86_64.zip"
}
Compress-Archive @compress
curl -i -T soot-dem-windows-msvc-x86_64.zip https://web.njit.edu/~ed242/deploy_soot_dem_windows_msvc.php?key=${{env.AFS_WINDOWS_MSVC_UPLOAD}}
- name: Archive compiled artifact
uses: actions/upload-artifact@v3
with:
name: soot-dem-windows-msvc-x86_64
path: |
dist
Compile-Linux-GNU:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run: |
mkdir dist/soot-dem/bin
mkdir cmake-build
cd cmake-build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
strip aggregate_deposition
strip afm_necking_fraction
strip restructuring
mv ./aggregate_deposition ../dist/soot-dem/bin/
mv ./afm_necking_fraction ../dist/soot-dem/bin/
mv ./restructuring ../dist/soot-dem/bin/
- name: Archive compiled artifact
uses: actions/upload-artifact@v3
with:
name: soot-dem-linux-gnu-x86_64
path: |
dist
Compile-MacOS:
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run: |
brew install llvm libomp
export CC=/opt/homebrew/opt/llvm/bin/clang
export CXX=/opt/homebrew/opt/llvm/bin/clang++
mkdir dist/soot-dem/bin
mkdir cmake-build
cd cmake-build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
strip aggregate_deposition
strip afm_necking_fraction
strip restructuring
mv ./aggregate_deposition ../dist/soot-dem/bin/
mv ./afm_necking_fraction ../dist/soot-dem/bin/
mv ./restructuring ../dist/soot-dem/bin/
cp /opt/homebrew/opt/llvm/lib/libunwind.1.dylib ../dist/soot-dem/bin/
cp /opt/homebrew/opt/llvm/lib/libomp.dylib ../dist/soot-dem/bin/
cd ../dist
tar -czvf soot-dem-windows-macos-arm64.tar.gz soot-dem/
curl -i -T soot-dem-windows-macos-arm64.tar.gz https://web.njit.edu/~ed242/deploy_soot_dem_macos_clang.php?key=${{env.AFS_MACOS_CLANG_UPLOAD}}
- name: Archive compiled artifact
uses: actions/upload-artifact@v3
with:
name: soot-dem-macos-clang-arm64
path: |
dist