-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from JamesParrott/main
Update tests to ignore tiny floating point diffrences
- Loading branch information
Showing
4 changed files
with
486 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
name: "Compile with CMake and Zig for Windows" | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: [ "Zig"] | ||
|
||
pull_request: | ||
branches: [ "Zig" ] | ||
|
||
env: | ||
CONFIGURATION: Release | ||
PLATFORM: x64 | ||
BOOST_VERSION: '1.8.3' | ||
|
||
|
||
jobs: | ||
build_and_upload_installer: | ||
name: Try to compile on windows with CMake | ||
runs-on: windows-2022 | ||
# outputs: | ||
# installer_file_name: ${{ steps.output_installer_file_name.outputs.name }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
||
# - name: Deploy Advinst | ||
# uses: caphyon/[email protected] | ||
# with: | ||
# # advinst-version: '21.3' | ||
# advinst-version: '21.7.1' | ||
|
||
# # advinst-license: ${{ secrets.ADVINST_LICENSE_KEY }} | ||
# # " advinst-license | ||
# # Advanced Installer license ID. This parameter is optional if you are using a simple project type. | ||
# # " | ||
|
||
- name: Install Ninja | ||
run: pip install ninja | ||
|
||
- name: Install Zig | ||
uses: goto-bus-stop/setup-zig@v2 | ||
with: | ||
version: 0.13.0 | ||
|
||
|
||
|
||
- name: Create Ninja build system from CMake | ||
shell: cmd | ||
# # CMake errors if given c:\vcpkg and /scripts/buildsystems/vcpkg.cmake | ||
run: | | ||
set VCPKG_ROOT=c:/vcpkg | ||
.\configure_for_zig.bat | ||
- name: Build sDNA | ||
shell: cmd | ||
# # CMake errors if given c:\vcpkg and /scripts/buildsystems/vcpkg.cmake | ||
run: | | ||
set VCPKG_ROOT=c:/vcpkg | ||
set BUILD_DIR=build_output_cmake_zig | ||
.\run_CMake_output_build_system.bat | ||
# - name: Output the name of the .msi installer file | ||
# id: output_installer_file_name | ||
# shell: bash | ||
# run: echo "name=$(ls sDNA_setup_win_v*.msi)" >> "$GITHUB_OUTPUT" | ||
|
||
|
||
|
||
- name: upload_output | ||
id: installer-upload-step | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: output | ||
# this file name pattern is defined in installerbits\rename_version.py | ||
# outfilename = os.path.join(outputdir, "sDNA_setup_win_v%s.msi" % filename_friendly_version) | ||
path: output/Release | ||
|
||
|
||
# test_installer: | ||
|
||
# needs: build_and_upload_installer | ||
|
||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# python_version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
# name: "Download and run sDNA installer, and run diff tests on it. " | ||
|
||
# runs-on: windows-2022 | ||
# # Note: The Windows server 2022 Github runner image already includes | ||
# # Python (currently 6 versions from 3.7 to 3.12) and a couple of | ||
# # VC++ redistributables. Desktop users may need to install these | ||
# # themselves, in addition to sDNA. | ||
# # | ||
# # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md | ||
# # | ||
|
||
# env: | ||
# installer_file_name: ${{ needs.build_and_upload_installer.outputs.installer_file_name }} | ||
|
||
# steps: | ||
|
||
|
||
# - uses: actions/checkout@v4 | ||
|
||
# - name: Download installer built in previous job | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: installer_file | ||
|
||
# - shell: cmd | ||
# run: dir . | ||
|
||
|
||
# - name: Allow the .msi to be executed | ||
# run: Set-ItemProperty -Path ${{ env.installer_file_name }} -Name IsReadOnly -Value $false | ||
|
||
|
||
# - name: Run sDNA installer using powershell script. | ||
# # This is based on @Simran-B's powershell script (from Github Community forum), | ||
# # according to GuiFalourd on Stack Overflow | ||
# # https://stackoverflow.com/a/72291019/20785734 | ||
# run: | | ||
# $file = "${{ env.installer_file_name }}" | ||
# $log = "install.log" | ||
# $procMain = Start-Process "msiexec" "/i `"$file`" /qn /l*! `"$log`"" -NoNewWindow -PassThru | ||
# $procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru | ||
# $procMain.WaitForExit() | ||
# $procLog.Kill() | ||
# Remove-Item $file | ||
|
||
|
||
# - name: Run regression tests | ||
# uses: ./.github/actions/run_regression_tests | ||
# with: | ||
# python_version: ${{ matrix.python_version }} | ||
# DONT_TEST_N_LINK_SUBSYSTEMS_ORDER: 1 | ||
# ALLOW_NEGATIVE_FORMULA_ERROR_ON_ANY_LINK_PRESENT: 1 | ||
# sdnadll: 'c:\Program Files (x86)\sDNA\x64\sdna_vs2008.dll' | ||
# sdna_debug: "" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
name: "Compile with CMake and GCC for Ubuntu" | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: [ "GCC_Linux"] | ||
|
||
pull_request: | ||
branches: [ "GCC_Linux" ] | ||
|
||
env: | ||
CONFIGURATION: Release | ||
PLATFORM: x64 | ||
BOOST_VERSION: '1.8.3' | ||
|
||
|
||
jobs: | ||
build_and_upload_installer: | ||
name: Try to compile on Ubuntu with CMake | ||
runs-on: "ubuntu-24.04" | ||
# outputs: | ||
# installer_file_name: ${{ steps.output_installer_file_name.outputs.name }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
||
# - name: Deploy Advinst | ||
# uses: caphyon/[email protected] | ||
# with: | ||
# # advinst-version: '21.3' | ||
# advinst-version: '21.7.1' | ||
|
||
# # advinst-license: ${{ secrets.ADVINST_LICENSE_KEY }} | ||
# # " advinst-license | ||
# # Advanced Installer license ID. This parameter is optional if you are using a simple project type. | ||
# # " | ||
|
||
|
||
- name: Install Git | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y git | ||
- uses: lukka/get-cmake@latest | ||
|
||
|
||
# Install vcpkg? | ||
|
||
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md | ||
- name: Create Ninja build system from CMake | ||
run: | | ||
VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT | ||
cmake -G Ninja -B build_output_cmake_gcc -S . | ||
- name: Build sDNA | ||
run: | | ||
cmake --build build_output_cmake_gcc | ||
# - name: Output the name of the .msi installer file | ||
# id: output_installer_file_name | ||
# shell: bash | ||
# run: echo "name=$(ls sDNA_setup_win_v*.msi)" >> "$GITHUB_OUTPUT" | ||
|
||
# - name: assemble_output | ||
|
||
|
||
- name: upload_output | ||
id: installer-upload-step | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: output | ||
# this file name pattern is defined in installerbits\rename_version.py | ||
# outfilename = os.path.join(outputdir, "sDNA_setup_win_v%s.msi" % filename_friendly_version) | ||
path: output | ||
|
||
|
||
# test_installer: | ||
|
||
# needs: build_and_upload_installer | ||
|
||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# python_version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
# name: "Download and run sDNA installer, and run diff tests on it. " | ||
|
||
# runs-on: windows-2022 | ||
# # Note: The Windows server 2022 Github runner image already includes | ||
# # Python (currently 6 versions from 3.7 to 3.12) and a couple of | ||
# # VC++ redistributables. Desktop users may need to install these | ||
# # themselves, in addition to sDNA. | ||
# # | ||
# # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md | ||
# # | ||
|
||
# env: | ||
# installer_file_name: ${{ needs.build_and_upload_installer.outputs.installer_file_name }} | ||
|
||
# steps: | ||
|
||
|
||
# - uses: actions/checkout@v4 | ||
|
||
# - name: Download installer built in previous job | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: installer_file | ||
|
||
# - shell: cmd | ||
# run: dir . | ||
|
||
|
||
# - name: Allow the .msi to be executed | ||
# run: Set-ItemProperty -Path ${{ env.installer_file_name }} -Name IsReadOnly -Value $false | ||
|
||
|
||
# - name: Run sDNA installer using powershell script. | ||
# # This is based on @Simran-B's powershell script (from Github Community forum), | ||
# # according to GuiFalourd on Stack Overflow | ||
# # https://stackoverflow.com/a/72291019/20785734 | ||
# run: | | ||
# $file = "${{ env.installer_file_name }}" | ||
# $log = "install.log" | ||
# $procMain = Start-Process "msiexec" "/i `"$file`" /qn /l*! `"$log`"" -NoNewWindow -PassThru | ||
# $procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru | ||
# $procMain.WaitForExit() | ||
# $procLog.Kill() | ||
# Remove-Item $file | ||
|
||
|
||
# - name: Run regression tests | ||
# uses: ./.github/actions/run_regression_tests | ||
# with: | ||
# python_version: ${{ matrix.python_version }} | ||
# DONT_TEST_N_LINK_SUBSYSTEMS_ORDER: 1 | ||
# ALLOW_NEGATIVE_FORMULA_ERROR_ON_ANY_LINK_PRESENT: 1 | ||
# sdnadll: 'c:\Program Files (x86)\sDNA\x64\sdna_vs2008.dll' | ||
# sdna_debug: "" |
Oops, something went wrong.