Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCons als Build-System verwenden #771

Merged
merged 39 commits into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5ba88ef
Add a build script that creates a virtual environment and triggers a …
michael-rapp Sep 5, 2023
5b2708f
Add build target for formatting Python code.
michael-rapp Sep 5, 2023
325bdf0
Add build target for checking the Python code style.
michael-rapp Sep 5, 2023
e4d4610
Remove unnecessary pass statement.
michael-rapp Sep 5, 2023
2560524
Fix Pylint warnings.
michael-rapp Sep 5, 2023
6efe0de
Add missing comments.
michael-rapp Sep 5, 2023
1eafa09
Add build target for formatting C++ code.
michael-rapp Sep 5, 2023
2bebe79
Add build target for checking the C++ code style.
michael-rapp Sep 5, 2023
4cf064c
Exit build if any invalid targets are given.
michael-rapp Sep 5, 2023
98983de
The class BuildModule does not override the property "build_dir" anym…
michael-rapp Sep 5, 2023
2ce4681
Add build target for installing runtime dependencies.
michael-rapp Sep 5, 2023
e8e107f
Add build target for compiling the C++ code.
michael-rapp Sep 5, 2023
4f7d308
Add build target for compiling the Cython code.
michael-rapp Sep 5, 2023
4a925d4
Add build targets for removing C++ and Cython build files.
michael-rapp Sep 5, 2023
38046ba
Add build target for installing shared libraries into the source tree.
michael-rapp Sep 5, 2023
f90e5bd
Add build target for installing extension modules into the source tree.
michael-rapp Sep 5, 2023
9a6ac9a
Add build targets for removing shared libraries and extension modules…
michael-rapp Sep 5, 2023
7558e27
Add build targets for building and installing wheel packages.
michael-rapp Sep 6, 2023
c21485d
Add build target for removing wheel packages.
michael-rapp Sep 6, 2023
42cc7f8
Add build target for running automated tests.
michael-rapp Sep 6, 2023
191b125
Edit isort config.
michael-rapp Sep 6, 2023
dd51efe
A build targets for generating the documentation.
michael-rapp Sep 6, 2023
55f3d7a
A build targets for removing the documentation.
michael-rapp Sep 6, 2023
23a92bf
Specify the default target.
michael-rapp Sep 6, 2023
3206fe9
Remove build dependencies from requirements.txt file.
michael-rapp Sep 6, 2023
5027982
Edit .gitignore file.
michael-rapp Sep 6, 2023
7cb1747
Use new build system for Linux and MacOS builds in Github workflows.
michael-rapp Sep 10, 2023
b7efef4
Fix command for activating virtual environment.
michael-rapp Sep 10, 2023
168d87e
Explicitly specify Python version.
michael-rapp Sep 10, 2023
2dd49e0
Install Roboto font before generating the documentation.
michael-rapp Sep 10, 2023
7ba4faa
Add bash script for running the build system on Windows
michael-rapp Sep 13, 2023
f2216f7
Use new build system for Windows builds in Github workflows.
michael-rapp Sep 13, 2023
ec5fb2d
Omit argument "--enable-virtualenv" when running SCons.
michael-rapp Sep 13, 2023
9decf14
Set exit code in build scripts.
michael-rapp Sep 13, 2023
8f8ab8c
Update changelog.
michael-rapp Sep 13, 2023
57ae7ac
Update Github workflow for publishing packages on PyPi.
michael-rapp Sep 13, 2023
1390882
Remove Makefile.
michael-rapp Sep 13, 2023
5c3a45c
Fix invokation of programs not installed in the virtual environment.
michael-rapp Sep 13, 2023
aed82c2
Update documentation.
michael-rapp Sep 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install OpenCL
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y opencl-headers ocl-icd-opencl-dev
- name: Install OpenMP
if: matrix.os == 'macos-latest'
run: |
brew install libomp
brew link libomp --force
- name: Install OpenCL
if: matrix.os == 'macos-latest'
run: |
brew install opencl-clhpp-headers
- name: Prepare MSVC
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -52,8 +66,9 @@ jobs:
- name: Build package mlrl-common
uses: pypa/cibuildwheel@v2
env:
CIBW_BEFORE_ALL_MACOS: brew install libomp && brew link libomp --force
CIBW_BEFORE_BUILD: make clean install_cpp install_cython
CIBW_BEFORE_BUILD_LINUX: ./build --clean && ./build install
CIBW_BEFORE_BUILD_MACOS: ./build --clean && CPLUS_INCLUDE_PATH=/usr/local/opt/opencl-clhpp-headers/include ./build install
CIBW_BEFORE_BUILD_WINDOWS: ./build.bat --clean && ./build.bat install
CIBW_BUILD_FRONTEND: build
CIBW_ARCHS: auto64
CIBW_SKIP: 'pp* *musllinux*'
Expand All @@ -62,8 +77,9 @@ jobs:
- name: Build package mlrl-boosting
uses: pypa/cibuildwheel@v2
env:
CIBW_BEFORE_ALL_MACOS: brew install libomp && brew link libomp --force
CIBW_BEFORE_BUILD: make clean install_cpp install_cython
CIBW_BEFORE_BUILD_LINUX: ./build --clean && ./build install
CIBW_BEFORE_BUILD_MACOS: ./build --clean && CPLUS_INCLUDE_PATH=/usr/local/opt/opencl-clhpp-headers/include ./build install
CIBW_BEFORE_BUILD_WINDOWS: ./build.bat --clean && ./build.bat install
CIBW_BUILD_FRONTEND: build
CIBW_ARCHS: auto64
CIBW_SKIP: 'pp* *musllinux*'
Expand Down Expand Up @@ -101,7 +117,7 @@ jobs:
- name: Build package mlrl-common
uses: pypa/cibuildwheel@v2
env:
CIBW_BEFORE_BUILD: make clean install_cpp install_cython
CIBW_BEFORE_BUILD: ./build --clean && ./build install
CIBW_BUILD_FRONTEND: build
CIBW_ARCHS_LINUX: aarch64
CIBW_SKIP: 'pp* *musllinux*'
Expand All @@ -110,7 +126,7 @@ jobs:
- name: Build package mlrl-boosting
uses: pypa/cibuildwheel@v2
env:
CIBW_BEFORE_BUILD: make clean install_cpp install_cython
CIBW_BEFORE_BUILD: ./build --clean && ./build install
CIBW_BUILD_FRONTEND: build
CIBW_ARCHS_LINUX: aarch64
CIBW_SKIP: 'pp* *musllinux*'
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
- '**/*.pyx'
- '**/*.py'
- '**/*.build'
- 'Makefile'
- 'python/requirements.txt'
- 'build'
- '**/requirements.txt'
- 'doc/**'
- 'python/subprojects/testbed/tests/**'
- '.github/workflows/test_build.yml'
Expand All @@ -26,15 +26,18 @@ jobs:
sudo apt install -y opencl-headers ocl-icd-opencl-dev
- name: Compile via GCC
run: |
make compile
./build compile
- name: Run Tests
run: |
make tests
./build tests
- name: Install Doxygen
uses: ssciwr/doxygen-install@v1
- name: Install Roboto font
run: |
sudo apt install -y fonts-roboto
- name: Generate Documentation
run: |
make doc
./build doc
macos_build:
name: Test MacOS build
runs-on: macos-latest
Expand All @@ -50,7 +53,7 @@ jobs:
brew install opencl-clhpp-headers
- name: Compile via Clang
run: |
CPLUS_INCLUDE_PATH=/usr/local/opt/opencl-clhpp-headers/include make compile
CPLUS_INCLUDE_PATH=/usr/local/opt/opencl-clhpp-headers/include ./build compile
windows_build:
name: Test Windows build
runs-on: windows-latest
Expand All @@ -73,4 +76,4 @@ jobs:
run: |
$env:INCLUDE += ";$($pwd.Path)\vcpkg\packages\opencl_x64-windows\include"
$env:LIB += ";$($pwd.Path)\vcpkg\packages\opencl_x64-windows\lib"
make compile
./build.bat compile
6 changes: 3 additions & 3 deletions .github/workflows/test_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- '**/*.hpp'
- '**/*.cpp'
- '**/*.py'
- 'Makefile'
- 'build'
- '.clang-format'
- '.isort.cfg'
- '.style.yapf'
Expand All @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v3
- name: Check C++ code style
run: |
make test_format_cpp
./build test_format_cpp
- name: Check Python code style
run: |
make test_format_python
./build test_format_python
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build files
__pycache__/
scons/build/
python/**/build/
python/**/dist/
python/**/*egg-info/
Expand All @@ -10,7 +11,6 @@ python/**/cython/*.lib
python/**/cython/*.pyd
python/**/tests/res/tmp/
cpp/build/
.cpp_files.tmp

# Documentation files
doc/_build/
Expand Down
4 changes: 2 additions & 2 deletions .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ supported_extensions=py,pxd,pyx
line_length=120
group_by_package=true
known_first_party=mlrl
known_third_party=sklearn,scipy,numpy,tabulate,arff
forced_separate=mlrl.common,mlrl.boosting,mlrl.seco,mlrl.testbed
known_third_party=sklearn,scipy,numpy,tabulate,arff,SCons
forced_separate=mlrl.common,mlrl.boosting,mlrl.seco,mlrl.testbed,SCons
lines_between_types=1
order_by_type=true
multi_line_output=2
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ A major update to the BOOMER algorithm that introduces the following changes.
* The documentation has been updated to a more modern theme supporting light and dark theme variants.
* A build option that allows to disable multi-threading support via OpenMP at compile-time has been added.
* The Python code is now checked for common issues by applying `pylint` via continuous integration.
* The Makefile has been replaced with wrapper scripts triggering a [SCons](https://scons.org/) build.

## Version 0.9.0 (Jul. 2nd, 2023)

Expand Down
Loading