diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml index 398bec9..3cfbcdb 100644 --- a/.github/workflows/Documenter.yml +++ b/.github/workflows/Documenter.yml @@ -27,24 +27,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - # BEGIN - Build smesh locally - remove once JLL package is available - - name: Get smesh - uses: actions/checkout@v4 - with: - repository: trixi-framework/smesh - path: smesh - - name: Build smesh (Linux) - run: | - mkdir smesh/build && cd smesh/build - cmake .. -DCMAKE_INSTALL_PREFIX=../install - cmake --build . - cmake --install . - cd ../../docs - cat << EOF > LocalPreferences.toml - [Smesh] - libsmesh = "$(pwd)/smesh/install/lib/libsmesh.so" - EOF - # END - Build smesh locally - remove once JLL package is available - uses: julia-actions/setup-julia@v1 with: version: '1' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c045d06..df2113c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,57 +47,13 @@ jobs: - ubuntu-latest - macOS-latest - windows-latest + exclude: + - os: macOS-latest + version: 1.8 + - os: macOS-latest + version: 1.9 steps: - uses: actions/checkout@v4 - # BEGIN - Build smesh locally - remove once JLL package is available - - uses: msys2/setup-msys2@v2 - if: ${{ matrix.os == 'windows-latest' }} - with: - update: true - install: git base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake - - name: Get smesh - uses: actions/checkout@v4 - with: - repository: trixi-framework/smesh - path: smesh - - name: Build smesh (Linux) - if: ${{ matrix.os == 'ubuntu-latest' }} - run: | - mkdir smesh/build && cd smesh/build - cmake .. -DCMAKE_INSTALL_PREFIX=../install - cmake --build . - cmake --install . - cd ../.. - cat << EOF > LocalPreferences.toml - [Smesh] - libsmesh = "$(pwd)/smesh/install/lib/libsmesh.so" - EOF - - name: Build smesh (macOS) - if: ${{ matrix.os == 'macos-latest' }} - run: | - mkdir smesh/build && cd smesh/build - FC=gfortran-13 cmake .. -DCMAKE_INSTALL_PREFIX=../install - cmake --build . - cmake --install . - cd ../.. - cat << EOF > LocalPreferences.toml - [Smesh] - libsmesh = "$(pwd)/smesh/install/lib/libsmesh.dylib" - EOF - - name: Build smesh - if: ${{ matrix.os == 'windows-latest' }} - run: | - mkdir smesh/build && cd smesh/build - FC=gfortran cmake .. -DCMAKE_INSTALL_PREFIX=../install - cmake --build . - cmake --install . - cd ../.. - cat << EOF > LocalPreferences.toml - [Smesh] - libsmesh = "D:\\\\a\\\\Smesh.jl\\\\Smesh.jl\\\\smesh\\\\install\\\\bin\\\\libsmesh.dll" - EOF - shell: 'msys2 {0}' - # END - Build smesh locally - remove once JLL package is available - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} diff --git a/.zenodo.json b/.zenodo.json new file mode 100644 index 0000000..3583325 --- /dev/null +++ b/.zenodo.json @@ -0,0 +1,24 @@ +{ + "title": "Smesh.jl", + "description": "A Julia wrapper for the Fortran package smesh to generate and handle unstructured meshes ", + "license": "MIT", + "upload_type": "software", + "creators": [ + { + "affiliation": "University of Cologne, Germany", + "name": "Chiocchetti, Simone", + "orcid": "0000-0001-7394-5708" + }, + { + "affiliation": "University of Cologne, Germany", + "name": "Bolm, Benjamin", + "orcid": "0009-0009-6055-8472" + }, + { + "affiliation": "Applied and Computational Mathematics, RWTH Aachen University, Germany", + "name": "Schlottke-Lakemper, Michael", + "orcid": "0000-0002-3195-2536" + } + ], + "access_right": "open" +} diff --git a/Project.toml b/Project.toml index 9c65af9..243e6b5 100644 --- a/Project.toml +++ b/Project.toml @@ -5,6 +5,7 @@ version = "0.1.0" [deps] Preferences = "21216c6a-2e73-6563-6e65-726566657250" +smesh_jll = "e8c45408-479c-54df-ae5b-4501057d3a5a" [compat] Preferences = "1" diff --git a/README.md b/README.md index 7979d0a..cc279b9 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,7 @@ operating system](https://julialang.org/downloads/platform/). [Smesh.jl](https://github.com/trixi-framewor/Smesh.jl) works with Julia v1.8 and later on Linux, macOS and Windows platforms. -To use Smesh.jl, you currently need to manually install the underlying Fortran package smesh -(note that this is subject to change in the near future). For installation instructions, -please follow the README in the [smesh](https://github.com/trixi-framework/smesh) -repository. +*Note: On pre-Apple Silicon systems with macOS, Julia v1.10 or later is required.* ### Installation Since Smesh.jl is a not registered Julia package yet, you can install it by executing @@ -31,9 +28,10 @@ the following commands in the Julia REPL: julia> import Pkg; Pkg.add("https://github.com/trixi-framework/Smesh.jl") ``` -To make use of the local smesh build, you need to tell Smesh.jl where to find the library. -For this, create a `LocalPreferences.toml` file next to your `Project.toml` for the project -in which you use Smesh.jl. It should have the following content: +By default, Smesh.jll uses pre-compiled binaries of the smesh package that will get +automatically installed when obtaining Smesh.jl. However, you can also make use of a local +smesh build. For this, create a `LocalPreferences.toml` file next to your `Project.toml` +for the project in which you use Smesh.jl. It should have the following content: * On Linux: ```toml diff --git a/src/Smesh.jl b/src/Smesh.jl index 8363939..67ca629 100644 --- a/src/Smesh.jl +++ b/src/Smesh.jl @@ -1,27 +1,11 @@ module Smesh -using Preferences: @load_preference, @has_preference +using Preferences: @load_preference +using smesh_jll: smesh_jll export build_delaunay_triangulation, delaunay_compute_neighbors -if !@has_preference("libsmesh") - error(""" - Missing preference `libsmesh` for package Smesh.jl. Please add a - `LocalPreferences.toml` file to your current Julia project with the following - content, where `path/to/libsmesh.{ext}` is the path to your local build of - libsmesh and `{ext}` is the appropriate extension for shared libraries on your - system (e.g., `so` on Linux, `dylib` on macOS, `dll` on Windows). Afterwards, - you need to restart Julia. - - Content of `LocalPreferences.toml` (between the '```' marks): - - ``` - [Smesh] - libsmesh = "path/to/libsmesh.{ext}" - ``` - """) -end -const libsmesh = @load_preference("libsmesh") +const libsmesh = @load_preference("libsmesh", smesh_jll.libsmesh) """ """