sDNA cross platform Python Wheels #21
Workflow file for this run
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
name: "Smoke test (GCC)." | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "Cross_platform", ] | |
pull_request: | |
branches: [ "Cross_platform", ] | |
env: | |
CONFIGURATION: Release | |
PLATFORM: x64 | |
BOOST_VERSION: '1.8.3' | |
jobs: | |
build_and_upload_output_dir: | |
name: "Compile on Ubuntu with CMake & GCC" | |
runs-on: "ubuntu-24.04" | |
# outputs: | |
# installer_file_name: ${{ steps.output_installer_file_name.outputs.name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Git | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y git ninja-build | |
# https://cran.r-project.org/bin/linux/ubuntu/fullREADME.html | |
- name: Create Ninja build system from CMake | |
run: > | |
cmake | |
-G "Ninja Multi-Config" | |
-D USE_ZIG=OFF | |
-B build_output_cmake_gcc | |
-S . | |
- name: Build sDNA | |
run: | | |
cmake --build build_output_cmake_gcc --config Release | |
- name: upload_output | |
id: installer-upload-step | |
uses: actions/upload-artifact@v4 | |
with: | |
name: output_gcc_linux | |
path: output | |
test_output_dir: | |
needs: build_and_upload_output_dir | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ['3.11'] | |
smoke_test: ["debug_test.py", | |
"hybrid_test.py", | |
"3d_test.py", | |
"partial_test.py", | |
"test_parallel_results.py", | |
"prepare_barns_test.py", | |
'../../../arcscripts/bin/sdnalearn.py --calibfile tiny.shp --target MADn --vars MGLAn,MCFn --boxcoxtarget --bcregex ".*" --mode single_best_variable --output regtestout_single_py3.txt --resids regtestresids_py3.shp', | |
'../../../arcscripts/bin/sdnalearn.py --calibfile tiny.shp --target MADn --vars MGLAn,MCFn --mode multiple_variables --output regtestout_multiple_py3.txt', | |
"make_od_test_shp.py", | |
'../../../arcscripts/bin/sdnaintegral.py --dll="$sdnadll" --im "net=skimtest" --om "skim=testout_od_skim_py3.csv" "radii=n;outputskim;skimzone=zone;nonetdata;metric=euclidean"', | |
'../../../arcscripts/bin/sdnaintegral.py --dll="$sdnadll" --im "net=skimtestzeroweight" --om "skim=testout_od_skimzeroweight_py3.csv" "radii=n;outputskim;skimzone=zone;nonetdata;metric=euclidean;weight=weight"', | |
'make_od_test_shp.py && python -u ../../../arcscripts/bin/sdnaintegral.py --dll="$sdnadll" --im "net=odtest;tables=testodmatrix.csv" --om "net=odtestoutsparse_py3" "radii=n;odmatrix"', | |
'make_od_test_shp.py && python -u ../../../arcscripts/bin/sdnaintegral.py --dll="$sdnadll" --im "net=odtest;tables=testodmatrix-nonsparse.csv" --om "net=odtestoutnonsparse_py3" "radii=n;odmatrix" ', | |
'../../../arcscripts/bin/sdnaprepare.py -i prep_crash_shapefile/shapefilepreparecrash -o prep_crash_shapefile/out_py3 --dll="$sdnadll" "action=repair;splitlinks;isolated;nearmisses;duplicates;xytol=0.01"', | |
"prepare_test_new.py",] | |
name: "Download and run sDNA output dir, and run diff tests on it (without diffing the output). " | |
runs-on: "ubuntu-24.04" | |
steps: | |
- uses: actions/checkout@v4 | |
# echo "new line of text" | sudo tee -a /etc/apt/sources.list | |
- name: Install R and deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y r-cran-optparse r-cran-sjstats | |
- uses: LizardByte/setup-python-action@master | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Install numpy | |
run: python -m pip install numpy PyShp==2.1.0 | |
- name: Download output tree built in previous job | |
uses: actions/download-artifact@v4 | |
with: | |
name: output_gcc_linux | |
path: output | |
- name: Smoke test | |
working-directory: ./sDNA/sdna_vs2008/tests | |
env: | |
sdnadll: '${{ github.workspace }}/output/Release/x64/sdna_vs2008.so' | |
run: "python -u ${{ matrix.smoke_test }}" |