Skip to content

Commit a35e578

Browse files
authored
Merge pull request #1964 from mccode-dev/configure-builds-mcpl-2.0
Prepare build dependencies for MCPL 2.0
2 parents 8767acb + 00b4f2a commit a35e578

31 files changed

+332
-262
lines changed

.github/workflows/mcstas-autobuild.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ jobs:
7171
if [ "$RUNNER_OS" == "macOS" ]; then ./buildscripts/build_macos_mcstas ${REV} && tar cfz mcstas-macOS-conda.tgz mcstas-macOS-arm64/ mcstas-macOS-x86_64/; fi;
7272
if [ "$RUNNER_OS" == "Linux" ]; then ./buildscripts/build_debs_mcstas ${REV} meta && mv dist mcstas-debian-x86_64 && tar cfz mcstas-debian-x86_64.tgz mcstas-debian-x86_64/; fi
7373
74+
- name: Package conda wrapper McStas for windows
75+
id: mcstas-conda-build
76+
run: |
77+
set -e
78+
set -u
79+
set -x
80+
cd McCode
81+
export REV=`git -c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' --tags origin 'v*.*.*' | tail -1 | cut -f3 -d/ | cut -f2 -dv`
82+
if [ "$RUNNER_OS" == "Linux" ]; then rm -rf dist; fi
83+
if [ "$RUNNER_OS" == "Linux" ]; then ./buildscripts/build_windows_mcstas_conda ${REV} meta && mv dist mcstas-conda-Windows-x86_64; fi
84+
if [ "$RUNNER_OS" == "Linux" ]; then tar cfz mcstas-conda-Windows-x86_64.tgz mcstas-conda-Windows-x86_64/; fi
85+
7486
- name: Cross-Build McStas for windows
7587
id: mcstas-mingw-build
7688
run: |

.github/workflows/mcstas-basictest.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
-DMCCODE_USE_LEGACY_DESTINATIONS=OFF \
107107
-DBUILD_TOOLS=ON \
108108
-DENABLE_COMPONENTS=ON \
109-
-DENSURE_MCPL=ON \
109+
-DENSURE_MCPL=OFF \
110110
-DENSURE_NCRYSTAL=OFF \
111111
-DENABLE_CIF2HKL=OFF \
112112
-DENABLE_NEUTRONICS=OFF \
@@ -119,11 +119,6 @@ jobs:
119119
then
120120
export MCSTAS_EXECUTABLE="mcstas.exe"
121121
export MCRUN_EXECUTABLE="mcrun.bat"
122-
cd ../install_mcstas/
123-
TOPDIR=`cygpath -m $PWD`
124-
cd -
125-
sed 's+@CPACK_NSIS_INSTALL_ROOT@+'${TOPDIR}'+g' ../src/3rdparty/mcpl-package/batches/mcpl-config.bat.in > ../install_mcstas/bin/mcpl-config.bat
126-
cat ../install_mcstas/bin/mcpl-config.bat
127122
fi
128123
test -f "../install_mcstas/bin/${MCSTAS_EXECUTABLE}"
129124
test -f "../install_mcstas/bin/${MCRUN_EXECUTABLE}"
@@ -144,15 +139,15 @@ jobs:
144139
set -x
145140
if [ "$RUNNER_OS" == "Windows" ];
146141
then
147-
python3 -mpip install PyYAML ply McStasscript ncrystal
142+
python3 -mpip install PyYAML ply McStasscript ncrystal mcpl mcpl-core mcpl-extra
148143
fi
149144
if [ "$RUNNER_OS" == "macOS" ];
150145
then
151-
python3 -mpip install PyYAML ply McStasScript ncrystal --break-system-packages
146+
python3 -mpip install PyYAML ply McStasScript ncrystal mcpl mcpl-core mcpl-extra --break-system-packages
152147
fi
153148
if [ "$RUNNER_OS" == "Linux" ];
154149
then
155-
python3 -mpip install PyYAML ply McStasscript ncrystal
150+
python3 -mpip install PyYAML ply McStasscript ncrystal mcpl mcpl-core mcpl-extra
156151
fi
157152
158153
- name: Launch RNG test instrument

.github/workflows/mcxtrace-autobuild.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ jobs:
7171
if [ "$RUNNER_OS" == "macOS" ]; then ./buildscripts/build_macos_mcxtrace ${REV} && tar cfz mcxtrace-macOS-conda.tgz mcxtrace-macOS-arm64/ mcxtrace-macOS-x86_64/; fi;
7272
if [ "$RUNNER_OS" == "Linux" ]; then ./buildscripts/build_debs_mcxtrace ${REV} meta && mv dist mcxtrace-debian-x86_64 && tar cfz mcxtrace-debian-x86_64.tgz mcxtrace-debian-x86_64/; fi
7373
74+
- name: Package conda wrapper McXtrace for windows
75+
id: mcxtrace-conda-build
76+
run: |
77+
set -e
78+
set -u
79+
set -x
80+
cd McCode
81+
export REV=`git -c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' --tags origin 'v*.*.*' | tail -1 | cut -f3 -d/ | cut -f2 -dv`
82+
if [ "$RUNNER_OS" == "Linux" ]; then rm -rf dist; fi
83+
if [ "$RUNNER_OS" == "Linux" ]; then ./buildscripts/build_windows_mcxtrace_conda ${REV} meta && mv dist mcxtrace-conda-Windows-x86_64; fi
84+
if [ "$RUNNER_OS" == "Linux" ]; then tar cfz mcxtrace-conda-Windows-x86_64.tgz mcxtrace-conda-Windows-x86_64/; fi
85+
7486
- name: Cross-Build McXtrace for windows
7587
id: mcxtrace-mingw-build
7688
run: |

.github/workflows/mcxtrace-basictest.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
-DMCCODE_USE_LEGACY_DESTINATIONS=OFF \
107107
-DBUILD_TOOLS=ON \
108108
-DENABLE_COMPONENTS=ON \
109-
-DENSURE_MCPL=ON \
109+
-DENSURE_MCPL=OFF \
110110
-DENSURE_NCRYSTAL=OFF \
111111
-DENABLE_CIF2HKL=OFF \
112112
-DENABLE_NEUTRONICS=OFF \
@@ -119,11 +119,6 @@ jobs:
119119
then
120120
export MCXTRACE_EXECUTABLE="mcxtrace.exe"
121121
export MXRUN_EXECUTABLE="mxrun.bat"
122-
cd ../install_mcxtrace/
123-
TOPDIR=`cygpath -m $PWD`
124-
cd -
125-
sed 's+@CPACK_NSIS_INSTALL_ROOT@+'${TOPDIR}'+g' ../src/3rdparty/mcpl-package/batches/mcpl-config.bat.in > ../install_mcxtrace/bin/mcpl-config.bat
126-
cat ../install_mcxtrace/bin/mcpl-config.bat
127122
fi
128123
test -f "../install_mcxtrace/bin/${MCXTRACE_EXECUTABLE}"
129124
test -f "../install_mcxtrace/bin/${MXRUN_EXECUTABLE}"
@@ -144,15 +139,15 @@ jobs:
144139
set -x
145140
if [ "$RUNNER_OS" == "Windows" ];
146141
then
147-
python3 -mpip install PyYAML ply McStasscript
142+
python3 -mpip install PyYAML ply McStasscript mcpl mcpl-core mcpl-extra
148143
fi
149144
if [ "$RUNNER_OS" == "macOS" ];
150145
then
151-
python3 -mpip install PyYAML ply McStasScript --break-system-packages
146+
python3 -mpip install PyYAML ply McStasScript mcpl mcpl-core mcpl-extra --break-system-packages
152147
fi
153148
if [ "$RUNNER_OS" == "Linux" ];
154149
then
155-
python3 -mpip install PyYAML ply McStasscript
150+
python3 -mpip install PyYAML ply McStasscript mcpl mcpl-core mcpl-extra
156151
fi
157152
158153
- name: Launch RNG test instrument

.github/workflows/mcxtrace-winbasictest-msvc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ jobs:
101101
run: pip install PyYAML ply McStasscript mslex mcpl mcpl-core mcpl-extra
102102

103103
- name: pip install deps Windows arm64
104-
if: runner.os == 'Windows' && matrix.os == 'windows-11-arm' mcpl mcpl-core mcpl-extra
105-
run: pip install PyYAML ply mslex
104+
if: runner.os == 'Windows' && matrix.os == 'windows-11-arm'
105+
run: pip install PyYAML ply mslex mcpl mcpl-core mcpl-extra
106106

107107
- name: pip install mcpl-core preview
108108
run: pip install -v "git+https://github.com/mctools/mcpl@path_to_mcpl2#subdirectory=mcpl_core"

buildscripts/build_debs_mcstas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ export ENABLE_CIF2HKL=OFF # cif2hkl is available as a separate p
5959
./mkdist $FLAVOUR-tools-python-${P}resplot $1 tools/Python/mcresplot/ "" $MCCODE_ARCH "" -- deb
6060
./mkdist $FLAVOUR-tools-python-${P}display-mantid $1 tools/Python/mcdisplay/mantid_xml/ "" $MCCODE_ARCH "" -- deb
6161

62-
cd 3rdparty/mcpl
62+
cd 3rdparty/mcpl/mcpl_core
6363
rm -rf build
6464
mkdir build
6565
cd build
6666
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DMCPL_ENABLE_CPACK=ON
67-
make -j10
67+
make -j${CMAKE_BUILD_PARALLEL_LEVEL}
6868
cpack -G DEB .
6969
DEB=`ls *.deb`
7070
DEBNAME=`echo $DEB | sed s/Linux/$MCCODE_ARCH/g`
@@ -77,7 +77,7 @@ rm -rf build
7777
mkdir build
7878
cd build
7979
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DNCRYSTAL_ENABLE_CPACK=ON
80-
make -j10
80+
make -j${CMAKE_BUILD_PARALLEL_LEVEL}
8181
cpack -G DEB .
8282
DEB=`ls *.deb`
8383
DEBNAME=`echo $DEB | sed s/Linux/$MCCODE_ARCH/g`

buildscripts/build_debs_mcstas32

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

buildscripts/build_debs_mcstas_arm64

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ export ENABLE_CIF2HKL=OFF # cif2hkl is available as a separate p
5959
./mkdist $FLAVOUR-tools-python-${P}resplot $1 tools/Python/mcresplot/ "" $MCCODE_ARCH "" -- deb
6060
./mkdist $FLAVOUR-tools-python-${P}display-mantid $1 tools/Python/mcdisplay/mantid_xml/ "" $MCCODE_ARCH "" -- deb
6161

62-
cd 3rdparty/mcpl
62+
cd 3rdparty/mcpl/mcpl_core
6363
rm -rf build
6464
mkdir build
6565
cd build
6666
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DMCPL_ENABLE_CPACK=ON
67-
make
67+
make -j${CMAKE_BUILD_PARALLEL_LEVEL}
6868
cpack -G DEB .
6969
DEB=`ls *.deb`
7070
DEBNAME=`echo $DEB | sed s/Linux/$MCCODE_ARCH/g`
@@ -77,7 +77,7 @@ rm -rf build
7777
mkdir build
7878
cd build
7979
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DNCRYSTAL_ENABLE_CPACK=ON
80-
make
80+
make -j${CMAKE_BUILD_PARALLEL_LEVEL}
8181
cpack -G DEB .
8282
DEB=`ls *.deb`
8383
DEBNAME=`echo $DEB | sed s/Linux/$MCCODE_ARCH/g`

buildscripts/build_debs_mcxtrace

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ export ENABLE_CIF2HKL=OFF # cif2hkl is available as a separate p
5656
./mkdist $FLAVOUR-manuals $1 docpkg/manuals/$FLAVOUR/ "" $MCCODE_ARCH "" -- deb
5757
./mkdist $FLAVOUR-tools-python-${P}doc $1 tools/Python/mcdoc/ "" $MCCODE_ARCH "" -- deb
5858

59-
cd 3rdparty/mcpl
59+
cd 3rdparty/mcpl/mcpl_core
6060
rm -rf build
6161
mkdir build
6262
cd build
6363
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DMCPL_ENABLE_CPACK=ON
64-
make
64+
make -j${CMAKE_BUILD_PARALLEL_LEVEL}
6565
cpack -G DEB .
6666
DEB=`ls *.deb`
6767
DEBNAME=`echo $DEB | sed s/Linux/$MCCODE_ARCH/g`

buildscripts/build_debs_mcxtrace32

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

0 commit comments

Comments
 (0)