-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from thermotools/prep_merge
New functionality
- Loading branch information
Showing
151 changed files
with
18,269 additions
and
2,939 deletions.
There are no files selected for viewing
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,13 @@ jobs: | |
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macOS-latest] | ||
|
||
os: [windows-latest, macOS-latest, ubuntu-latest] | ||
env: | ||
THERMOPACK_DIR: thermopack-${{ matrix.os }} | ||
THERMOPACK_DIR_WINDOWS: "D:/a/KineticGas/KineticGas/thermopack-windows-latest/thermopack-windows-latest" | ||
THERMOPACK_URL: https://github.com/vegardjervell/thermopack/releases/download/Latest-beta | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: checkout submodules | ||
|
@@ -18,20 +22,38 @@ jobs: | |
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v4 | ||
|
||
- name: Install cibuildwheel and other dependencies | ||
run: python -m pip install cibuildwheel==2.17.0 build wheel setuptools | ||
- name: Fetch Thermopack | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
curl -L -o thermopack.zip ${{ env.THERMOPACK_URL }}/thermopack-${{ matrix.os }}.zip | ||
unzip thermopack.zip | ||
export THERMOPACK_DIR=${PWD}/${{ env.THERMOPACK_DIR }}/ | ||
curl -L -o thermopack_whl.zip ${{ env.THERMOPACK_URL }}/wheel-v2-${{ matrix.os }}.zip | ||
unzip thermopack_whl.zip | ||
pip install wheel-v2-${{ matrix.os }}/* | ||
- name: Build sdist | ||
run: pipx run build --sdist --outdir wheelhouse | ||
if: runner.os == 'Windows' | ||
- name: Fetch Thermopack (Windows) | ||
if: matrix.os == 'windows-latest' | ||
shell: pwsh | ||
run: | | ||
Invoke-WebRequest -Uri "${{ env.THERMOPACK_URL }}/thermopack-${{ matrix.os }}.zip" -OutFile "thermopack.zip" | ||
Expand-Archive -Path "thermopack.zip" -DestinationPath "${{ env.THERMOPACK_DIR }}" | ||
$THERMOPACK_DIR = "${PWD}/${{ env.THERMOPACK_DIR }}/${{ env.THERMOPACK_DIR }}" | ||
[System.Environment]::SetEnvironmentVariable("THERMOPACK_DIR", $THERMOPACK_DIR) | ||
"$THERMOPACK_DIR=$THERMOPACK_DIR" | Out-File -FilePath $env:GITHUB_ENV -Append | ||
Invoke-WebRequest -Uri "${{ env.THERMOPACK_URL }}/wheel-v2-${{ matrix.os }}.zip" -OutFile "thermopack_whl.zip" | ||
Expand-Archive -Path "thermopack_whl.zip" -DestinationPath "wheel-v2-${{ matrix.os }}" | ||
cd wheel-v2-${{ matrix.os }} | ||
pip install (Get-ChildItem wheel-v2-windows-latest\*.whl).FullName | ||
- name: Build wheels | ||
uses: pypa/[email protected] # run: python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_ARCHS: auto64 | ||
CIBW_ARCHS_MACOS: "universal2" | ||
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0 | ||
CIBW_ENVIRONMENT_LINUX: CXXFLAGS='-fconcepts' | ||
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0 THERMOPACK_DIR=${PWD}/${{ env.THERMOPACK_DIR }} | ||
CIBW_ENVIRONMENT_LINUX: CXXFLAGS='-fconcepts' THERMOPACK_DIR=${PWD}/${{ env.THERMOPACK_DIR }} | ||
CIBW_ENVIRONMENT_WINDOWS: THERMOPACK_DIR=${{ env.THERMOPACK_DIR_WINDOWS}} | ||
CIBW_BUILD_VERBOSITY_WINDOWS: 2 | ||
CIBW_SKIP: "*pypy* *pp* *cp36* *cp37* *musl*" | ||
with: | ||
|
@@ -56,7 +78,7 @@ jobs: | |
pattern: wheels-* | ||
|
||
release_wheels: # Create or update the release tagged Latest-beta, and upload wheels to that release. | ||
if: ${{ github.event.pull_request.merged }} | ||
# if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
needs: build_wheels | ||
runs-on: ubuntu-latest | ||
permissions: | ||
|
@@ -91,7 +113,7 @@ jobs: | |
tag: Latest-beta | ||
commit: main | ||
makeLatest: true | ||
bodyFile: "release_bodyFile.md" | ||
bodyFile: ".github/release_bodyFile.md" | ||
artifacts: "wheels-*.zip" | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Run Tests | ||
on: push | ||
|
||
jobs: | ||
test: | ||
name: Test on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macOS-latest, macOS-12, ubuntu-latest, windows-latest] | ||
env: | ||
THERMOPACK_DIR: thermopack-${{ matrix.os }} | ||
THERMOPACK_URL: https://github.com/vegardjervell/thermopack/releases/download/Latest-beta | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: checkout submodules | ||
run: git submodule update --init --recursive | ||
|
||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v4 | ||
|
||
- name: Install thermopack | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
curl -L -o thermopack.zip ${{ env.THERMOPACK_URL }}/thermopack-${{ matrix.os }}.zip | ||
unzip thermopack.zip | ||
export THERMOPACK_DIR=${PWD}/thermopack-${{ matrix.os }}/ | ||
curl -L -o thermopack_whl.zip ${{ env.THERMOPACK_URL }}/wheel-v2-${{ matrix.os }}.zip | ||
unzip thermopack_whl.zip | ||
pip install wheel-v2-${{ matrix.os }}/* | ||
- name: Build KineticGas | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
echo "THERMOPACK_DIR (GH_ENV) : ${{ env.THERMOPACK_DIR }} / (ENV) ${THERMOPACK_DIR}" | ||
export THERMOPACK_DIR=${PWD}/${{ env.THERMOPACK_DIR }} | ||
ls -R ${THERMOPACK_DIR} | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make -j4 install | ||
- name: Install thermopack Windows | ||
if: matrix.os == 'windows-latest' | ||
shell: pwsh | ||
run: | | ||
Invoke-WebRequest -Uri "${{ env.THERMOPACK_URL }}/wheel-v2-${{ matrix.os }}.zip" -OutFile "thermopack_whl.zip" | ||
Expand-Archive -Path "thermopack_whl.zip" -DestinationPath "wheel-v2-${{ matrix.os }}" | ||
cd wheel-v2-${{ matrix.os }} | ||
pip install (Get-ChildItem wheel-v2-windows-latest\*.whl).FullName | ||
- name: Build KineticGas Windows | ||
if: matrix.os == 'windows-latest' | ||
shell: pwsh | ||
run: | | ||
Invoke-WebRequest -Uri "${{ env.THERMOPACK_URL }}/thermopack-${{ matrix.os }}.zip" -OutFile "thermopack.zip" | ||
Expand-Archive -Path "thermopack.zip" -DestinationPath "${{ env.THERMOPACK_DIR }}" | ||
$THERMOPACK_DIR = "$PWD\${{ env.THERMOPACK_DIR }}\thermopack-${{ matrix.os }}" | ||
[System.Environment]::SetEnvironmentVariable("THERMOPACK_DIR", $THERMOPACK_DIR) | ||
ls -R ${THERMOPACK_DIR} | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake --build . --config=Release --target install | ||
- name: Build KineticGas Windows | ||
if: matrix.os == 'windows-latest' | ||
shell: pwsh | ||
run: | | ||
pip install . | ||
$THERMOPACK_DIR = "$PWD/${{ env.THERMOPACK_DIR }}" | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake --build . --config=Release --target install | ||
- name: Inspect libpykingas | ||
if: matrix.os != 'ubuntu-latest' && matrix.os != 'windows-latest' | ||
run: otool -L pykingas/libpykingas.* | ||
|
||
- name: Run pytests | ||
run: | | ||
pip install .[test] | ||
pytest tests/ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
[submodule "cpp/external/pybind11"] | ||
path = cpp/external/pybind11 | ||
url = https://github.com/pybind/pybind11.git | ||
[submodule "cpp/external/json"] | ||
path = cpp/external/json | ||
url = https://github.com/nlohmann/json.git | ||
[submodule "cpp/external/eigen"] | ||
path = cpp/external/eigen | ||
url = https://gitlab.com/libeigen/eigen.git | ||
[submodule "cpp/external/autodiff"] | ||
path = cpp/external/autodiff | ||
url = https://github.com/autodiff/autodiff.git | ||
[submodule "cpp/external/thermopack"] | ||
path = cpp/external/thermopack | ||
url = https://github.com/thermotools/thermopack.git |
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
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
Oops, something went wrong.