Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Oct 12, 2023
1 parent 3aa166f commit 1aeccb8
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 236 deletions.
103 changes: 100 additions & 3 deletions .github/workflows/dev-ubuntu.yml → .github/workflows/dev-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
compiler: [ { c: gcc, cpp: g++, fortran: gfortran }, { c: icx, cpp: icpx, fortran: ifx } ]
avx: [ ON, OFF ]
vtk: [ ON, OFF ]
mkl: [ ON ]
mkl: [ ON, OFF ]
steps:
- name: Clone
uses: actions/checkout@v4
Expand Down Expand Up @@ -84,8 +84,6 @@ jobs:
fi
if [ "${{ matrix.vtk }}" == "ON" ]; then
file_name+="-vtk"
else
file_name+="-no-vtk"
fi
if [ "${{ matrix.mkl }}" == "ON" ]; then
file_name+="-mkl"
Expand Down Expand Up @@ -116,3 +114,102 @@ jobs:
uses: codecov/codecov-action@v3
with:
gcov: true
macos-dev:
runs-on: macos-11
timeout-minutes: 100
strategy:
matrix:
build: [ Debug ]
compiler: [ GCC, CLANG ]
vtk: [ ON, OFF ]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Golang
uses: actions/setup-go@v4
- name: VTK
run: |
if [ "${{ matrix.vtk }}" == "ON" ]; then
wget -q https://github.com/TLCFEM/prebuilds/releases/download/latest/VTK-9.2.6-macos.tar.gz
tar xf VTK-9.2.6-macos.tar.gz
brew install glfw glew
fi
- name: Compile
run: |
go build Checker/updater.go
mkdir build && cd build
if [ "${{ matrix.compiler }}" == "CLANG" ]; then
export CC=$(brew --prefix llvm@15)/bin/clang
export CXX=$(brew --prefix llvm@15)/bin/clang++
export FC=gfortran-11
cmake -DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_Fortran_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_EXTERNAL_VTK=${{ matrix.vtk }} -DVTK_DIR=/Users/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=suanPan-macos ..
else
export CC=gcc-11
export CXX=g++-11
export FC=gfortran-11
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_EXTERNAL_VTK=${{ matrix.vtk }} -DVTK_DIR=/Users/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=suanPan-macos ..
fi
make install -j4
- name: Test
run: |
export DYLD_LIBRARY_PATH=/Users/runner/work/suanPan/suanPan/suanPan-macos/lib/
./suanPan-macos/bin/suanPan -v
windows-dev:
runs-on: windows-2022
timeout-minutes: 100
strategy:
matrix:
build: [ Release, Debug ]
compiler: [ VS, GCC ]
vtk: [ ON, OFF ]
avx: [ ON, OFF ]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Golang
uses: actions/setup-go@v4
- name: Install VTK
run: |
C:/msys64/usr/bin/wget.exe -q https://github.com/TLCFEM/prebuilds/releases/download/latest/VTK-9.2.6-win.7z
7z x VTK-9.2.6-win.7z
- name: Compile
run: |
go build Checker/updater.go
mkdir build && cd build
if ( ${{ matrix.compiler }} -eq "VS") {
$generator = "Visual Studio 17 2022"
} else {
$generator = "MinGW Makefiles"
}
cmake -G "$generator" -DCMAKE_BUILD_TYPE=${{ matrix.build}} -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_EXTERNAL_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=suanPan-win ..
cmake --build . --target INSTALL -j 4
- name: Pack
shell: bash
run: |
cp updater.exe build/suanPan-win/bin
cd build/suanPan-win/bin
file_name="suanPan-win"
if [ "${{ matrix.build }}" == "Debug" ]; then
file_name+="-debug"
else
file_name+="-release"
fi
file_name+="-openblas"
if [ "${{ matrix.avx }}" == "ON" ]; then
file_name+="-avx"
else
file_name+="-no-avx"
fi
if [ "${{ matrix.vtk }}" == "ON" ]; then
file_name+="-vtk"
fi
file_name+=".7z"
echo "ARTIFACT=$file_name" >> "$GITHUB_ENV"
7z a ../../../$file_name ./*
./suanPan.exe -v
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}

77 changes: 0 additions & 77 deletions .github/workflows/dev-mkl-vtk.yml

This file was deleted.

111 changes: 0 additions & 111 deletions .github/workflows/dev-vtk.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/dev.yml

This file was deleted.

0 comments on commit 1aeccb8

Please sign in to comment.