CI pipeline triggered by egor-demidov #102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |