Skip to content

Commit

Permalink
Merge branch 'master' into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed May 30, 2023
2 parents 4ade38e + 8d38330 commit dbd2cc2
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 16 deletions.
139 changes: 132 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ on:
branches: [ "master", "develop" ]

jobs:
build-linux:
#-------------------------------------------------------------------------------
# PyPI / Linux
#-------------------------------------------------------------------------------
build-pypi-linux:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64

Expand Down Expand Up @@ -38,7 +41,7 @@ jobs:
pypi-publish:
name: Upload release to PyPI
if: github.ref == 'refs/heads/master'
needs: build-linux
needs: build-pypi-linux
runs-on: ubuntu-latest
environment:
name: pypi
Expand All @@ -56,7 +59,10 @@ jobs:
with:
packages-dir: wheelhouse/

build-windows:
#-------------------------------------------------------------------------------
# Anaconda / Windows
#-------------------------------------------------------------------------------
build-anaconda-windows:
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -89,13 +95,13 @@ jobs:
- name: Archive packages
uses: actions/upload-artifact@v3
with:
name: anaconda-packages
name: anaconda-windows-packages
path: C:\Miniconda\envs\test\conda-bld\win-64\pytessel-*.tar.bz2

anaconda-publish:
name: Upload release to Anaconda
name: Publish Anaconda / Windows
if: github.ref == 'refs/heads/master'
needs: build-windows
needs: build-anaconda-windows
runs-on: ubuntu-latest
environment:
name: anaconda
Expand All @@ -113,7 +119,7 @@ jobs:
- name: Retrieve packages
uses: actions/download-artifact@v3
with:
name: anaconda-packages
name: anaconda-windows-packages
path: packages
- name: publish-to-conda
shell: bash -l {0}
Expand All @@ -123,3 +129,122 @@ jobs:
export ANACONDA_API_TOKEN=$INPUT_ANACONDATOKEN
anaconda upload packages/*.tar.bz2
#-------------------------------------------------------------------------------
# Anaconda / Linux
#-------------------------------------------------------------------------------
build-anaconda-linux:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential libglm-dev libboost-all-dev
- name: Set-up miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
environment-file: environment.yml
python-version: 3.8
auto-activate-base: false
- name: Build
run: |
conda install conda-build
conda build . --no-include-recipe
- name: Archive packages
uses: actions/upload-artifact@v3
with:
name: anaconda-linux-packages
path: /usr/share/miniconda/conda-bld/linux-64/pytessel-*.tar.bz2

publish-anaconda-linux:
name: Publish Anaconda / Linux
if: github.ref == 'refs/heads/master'
needs: build-anaconda-linux
runs-on: ubuntu-latest
environment:
name: anaconda
url: https://anaconda.org/ifilot/pytessel
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set-up miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
environment-file: environment.yml
python-version: 3.8
auto-activate-base: false
- name: Retrieve packages
uses: actions/download-artifact@v3
with:
name: anaconda-linux-packages
path: packages
- name: publish-to-conda
shell: bash -l {0}
env:
INPUT_ANACONDATOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
export ANACONDA_API_TOKEN=$INPUT_ANACONDATOKEN
anaconda upload packages/*.tar.bz2
#-------------------------------------------------------------------------------
# Anaconda / Linux
#-------------------------------------------------------------------------------
build-anaconda-macos:
runs-on: macos-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install glm
brew install boost
- name: Set-up miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
environment-file: environment.yml
python-version: 3.8
auto-activate-base: false
- name: Build
run: |
conda install conda-build
conda build . --no-include-recipe
- name: Archive packages
uses: actions/upload-artifact@v3
with:
name: anaconda-macos-packages
path: /usr/local/miniconda/conda-bld/osx-64/pytessel-*.tar.bz2

publish-anaconda-macos:
name: Publish Anaconda / MacOS
if: github.ref == 'refs/heads/master'
needs: build-anaconda-macos
runs-on: ubuntu-latest
environment:
name: anaconda
url: https://anaconda.org/ifilot/pytessel
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set-up miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
environment-file: environment.yml
python-version: 3.8
auto-activate-base: false
- name: Retrieve packages
uses: actions/download-artifact@v3
with:
name: anaconda-macos-packages
path: packages
- name: publish-to-conda
shell: bash -l {0}
env:
INPUT_ANACONDATOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
export ANACONDA_API_TOKEN=$INPUT_ANACONDATOKEN
anaconda upload packages/*.tar.bz2
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: "pytessel"
version: "1.0.0"
version: "1.0.1"

source:
path: .
Expand Down
1 change: 0 additions & 1 deletion pytessel/isosurface_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <fstream>
#include <set>
#include <vector>
#include <omp.h>
#include <unordered_map>

#define GLM_FORCE_SWIZZLE
Expand Down
1 change: 0 additions & 1 deletion pytessel/scalar_field.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class ScalarField{
private:
std::array<unsigned int, 3> grid_dimensions;
std::vector<float> gridptr;
unsigned int gridsize;
glm::mat3 unitcell;
glm::mat3 unitcell_inverse;

Expand Down
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,8 @@ def find_windows_versions():
extra_compile_args = ["/wd4244"]
extra_link_args = []
elif sys.platform == 'darwin':
# NOTE: THIS HAS NOT BEEN ADAPTED FOR GITHUB ACTIONS
# os.environ['CC'] = "/usr/local/Cellar/gcc/11.2.0_3/bin/gcc-11"
# os.environ['CXX'] = "/usr/local/Cellar/gcc/11.2.0_3/bin/c++-11"
os.environ['CFLAGS'] = '-I/usr/local/Cellar/boost/1.76.0/include -I/usr/local/Cellar/glm/0.9.9.8/include'
extra_compile_args = ["-Wno-date-time", "-fPIC"]
os.environ['CFLAGS'] = '-I/usr/local/Cellar/boost/1.81.0_1/include -I /usr/local/Cellar/glm/0.9.9.8/include'
extra_compile_args = ["-Wno-date-time", "-fPIC", "-std=c++14"]
extra_link_args = []

ext_modules = [
Expand All @@ -96,7 +93,7 @@ def find_windows_versions():

setup(
name='pytessel',
version="1.0.0",
version="1.0.1",
author="Ivo Filot",
author_email="ivo@ivofilot.nl",
description="Python package for building isosurfaces from 3D scalar fields",
Expand Down

0 comments on commit dbd2cc2

Please sign in to comment.