From 494a8e0ca17eb76064caaef899ebe158c2116982 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Tue, 12 Aug 2025 09:09:06 -0500 Subject: [PATCH 1/6] Added test build CI action. --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ .gitignore | 37 +++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bc91218 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: CI Wheel building test + +on: + pull_request: + branches: [main, develop] + push: + branches: [main, develop, ci_build] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + - name: set up python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install ubuntu dependencies + run: | + sudo apt update + apt install build-essential cmake libhdf5-dev libtiff-dev + - name: Configure Cmake and build + run: | + cmake -D mcnptools.python_install=User . + cmake --build . --config Release + - name: Test C++ side + run: ctest --build-config Release + - name: build wheel + run: | + cd python + pip install build + python -m build . + - name: test install wheel + run: pip install dist/*.whl + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build + path: dist/* diff --git a/.gitignore b/.gitignore index 00bdb77..94b4d66 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,40 @@ *~ *.bak *.sw? + +# cmake artifacts +CMakeCache.txt +CMakeFiles/ +CTestTestfile.cmake +*.tcl +Makefile +*.cmake +*.a +*.so +*.unix + +# testing artifacts +Testing/ +git-submodule-packages/ +lib/ +libmcnptools/tests/ +*.vts + + +# python build artifacts +python/build +python/dist +python/setup.py +python/setup.py_configure +python/mcnptools.egg-info + +# Build executables +libmcnptools/include/mcnptools/MCNPTools_Config.hpp +utils/l3d2vtk/l3d2vtk +utils/l3dcoarsen/l3dcoarsen +utils/l3dinfo/l3dinfo +utils/l3dscale/l3dscale +utils/mctal2rad/mctal2rad +utils/mergemctals/mergemctals +utils/mergemeshtals/mergemeshtals +utils/meshtal2vtk/meshtal2vtk From 0cf2e58124d9c6697487acf5661bc353b332c60f Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Tue, 12 Aug 2025 09:12:09 -0500 Subject: [PATCH 2/6] Used more robust Apt options. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc91218..569314f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,8 +21,8 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install ubuntu dependencies run: | - sudo apt update - apt install build-essential cmake libhdf5-dev libtiff-dev + sudo apt-get update + sudo apt-get install -y build-essential cmake libhdf5-dev libtiff-dev - name: Configure Cmake and build run: | cmake -D mcnptools.python_install=User . From e54285866703dee3e03316437e1a513e226f7137 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Tue, 12 Aug 2025 09:45:59 -0500 Subject: [PATCH 3/6] Updated where wheels exist. --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 569314f..5c4c872 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: branches: [main, develop, ci_build] jobs: - build: + build_linux: runs-on: ubuntu-latest strategy: matrix: @@ -35,9 +35,9 @@ jobs: pip install build python -m build . - name: test install wheel - run: pip install dist/*.whl + run: pip install python/dist/*.whl - name: Upload build artifacts uses: actions/upload-artifact@v4 with: - name: build - path: dist/* + name: build-${{ matrix.python-version }} + path: python/dist/* From 1180d706be16d5d7733d9c445531e980ccdac380 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Tue, 12 Aug 2025 09:53:54 -0500 Subject: [PATCH 4/6] Filter files more. --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c4c872..6571904 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,5 +39,11 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v4 with: - name: build-${{ matrix.python-version }} - path: python/dist/* + name: wheel-linux-${{ matrix.python-version }} + path: python/dist/*.whl + - name: Upload Source tar bal + uses: actions/upload-artifact@v4 + if: ${{ matrix.python-version == '3.12'}} + with: + name: linux_source + path: dist/*.gz From ce5a79cd85b63ce15b7e7986510104203f175e46 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Tue, 12 Aug 2025 10:01:19 -0500 Subject: [PATCH 5/6] Fixed source-tree path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6571904..20ce177 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,4 +46,4 @@ jobs: if: ${{ matrix.python-version == '3.12'}} with: name: linux_source - path: dist/*.gz + path: python/dist/*.gz From 2b2004b181710d5cdb4a9248d08f8702109642ed Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Tue, 12 Aug 2025 10:44:58 -0500 Subject: [PATCH 6/6] Added ubuntu-arm to matrix. --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20ce177..6e0e882 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,10 +8,11 @@ on: jobs: build_linux: - runs-on: ubuntu-latest + runs-on: $${{ matrix.os }} strategy: matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + os: ["ubuntu-latest", "ubuntu-24.04-arm"] steps: - uses: actions/checkout@v4 @@ -39,7 +40,7 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v4 with: - name: wheel-linux-${{ matrix.python-version }} + name: wheel-linux-$${{ matrix.os }}-${{ matrix.python-version }} path: python/dist/*.whl - name: Upload Source tar bal uses: actions/upload-artifact@v4