Skip to content

Commit c97de09

Browse files
authored
gh-action (#2)
* gh-action * fixed setup and updated polyfem * disabled macos
1 parent 3099454 commit c97de09

File tree

6 files changed

+71
-95
lines changed

6 files changed

+71
-95
lines changed

.appveyor.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/continuous.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
CTEST_OUTPUT_ON_FAILURE: ON
13+
CTEST_PARALLEL_LEVEL: 2
14+
15+
jobs:
16+
Build:
17+
name: ${{ matrix.name }} (${{ matrix.config }})
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-18.04, windows-2019]
23+
config: [Debug, Release]
24+
include:
25+
- os: ubuntu-18.04
26+
name: Linux
27+
- os: windows-2019
28+
name: Windows
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v1
32+
with:
33+
fetch-depth: 10
34+
35+
- name: Setup NMake (Windows)
36+
if: runner.os == 'Windows'
37+
uses: ilammy/msvc-dev-cmd@v1
38+
39+
- name: Stetup Conda
40+
uses: s-weigand/setup-conda@v1
41+
with:
42+
conda-channels: anaconda, conda-forge
43+
python-version: 3.6
44+
45+
- name: Install Dependencies
46+
run: conda install numpy libblas libcblas suitesparse plotly -y
47+
48+
- name: Envs (Windows)
49+
if: runner.os == 'Windows'
50+
run: echo "CMAKE_GENERATOR=NMake Makefiles" >> $GITHUB_ENV
51+
52+
- name: Build (Debug)
53+
if: matrix.config == 'Debug'
54+
run: python setup.py build --debug install
55+
56+
- name: Build (Release)
57+
if: matrix.config == 'Release'
58+
run: python setup.py build install
59+
60+
- name: Tests
61+
run: |
62+
python test/test_bending.py
63+
python test/test_gravity.py
64+
python test/test_inflation.py
65+
python test/test_plane_hole.py

.travis.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
3131

3232
################################################################################
3333

34-
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
35-
foreach(config ${CMAKE_CONFIGURATION_TYPES})
36-
string(TOUPPER ${config} config)
37-
string(REPLACE /MD /MT CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
38-
string(REPLACE /MD /MT CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
39-
endforeach()
40-
endif()
41-
42-
################################################################################
43-
4434

4535
# Setup dependencies
4636
include(PolyfemPythonDependencies)

cmake/PolyfemPythonDownloadExternal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ endfunction()
2727
function(polyfem_python_download_polyfem)
2828
polyfem_python_download_project(polyfem
2929
GIT_REPOSITORY https://github.com/polyfem/polyfem.git
30-
GIT_TAG 20cc7b6d525c044b4cfe7730d5b7f52961f328eb
30+
GIT_TAG 43903b617ee3439d4cfad15e3b2ea6454518dd9f
3131
)
3232
endfunction()
3333

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ def build_extension(self, ext):
4343

4444
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
4545
'-DPYTHON_EXECUTABLE=' + sys.executable,
46-
'-DPOLYFEM_WITH_PARDISO=OFF',
46+
'-DPOLYSOLVE_WITH_PARDISO=OFF',
4747
'-DPOLYFEM_NO_UI=ON',
4848
'-DPOLYFEM_WITH_APPS=OFF',
4949
'-DPOLYFEM_WITH_MISC=OFF',
50-
'-DPOLYFEM_WITH_AMGCL=OFF',
51-
# '-DPOLYFEM_WITH_MKL=ON',
52-
'-DPOLYFEM_WITH_SPECTRA=OFF']
50+
'-DPOLYSOLVE_WITH_AMGCL=OFF',
51+
'-DPOLYSOLVE_WITH_MKL=OFF',
52+
'-DPOLYSOLVE_WITH_SPECTRA=OFF']
5353

5454
cfg = 'Debug' if self.debug else 'Release'
5555
build_args = ['--config', cfg]
@@ -61,7 +61,7 @@ def build_extension(self, ext):
6161
if os.environ.get('CMAKE_GENERATOR') != "NMake Makefiles":
6262
if sys.maxsize > 2**32:
6363
cmake_args += ['-A', 'x64']
64-
build_args += ['--', '/m']
64+
# build_args += ['--', '/m']
6565
else:
6666
build_args += ['--', '-j2']
6767

0 commit comments

Comments
 (0)