diff --git a/.github/CLA.md b/.github/CLA.md new file mode 100644 index 0000000000..5ef5713408 --- /dev/null +++ b/.github/CLA.md @@ -0,0 +1,59 @@ +# Contributor License Agreement - OPEN CASCADE TECHNOLOGY + +Thank You for Your interest in Open CASCADE Technology. + +In order to clarify the intellectual property rights and the license granted to OPEN CASCADE SAS with contributions from You, any person or entity, OPEN CASCADE SAS must have this Contributor License Agreement (hereinafter referred to as "CLA") signed by You, indicating Your acceptance and consent to the license terms below. This license is for Your protection as a contributor as well as for the protection of OPEN CASCADE SAS and its users; it does not change Your rights to use Your own contributions for any other purpose. + +This CLA applies to any contribution that You make to the product "Open CASCADE Technology" (hereinafter referred to as "OCCT", "the Product") developed by OPEN CASCADE SAS, including all contributions You made prior to signing this CLA and all of Your future contributions submitted to OPEN CASCADE SAS as long as You agree to this CLA, and sets out the intellectual property rights You grant to OPEN CASCADE SAS in the contributed materials. The term "us" shall also mean OPEN CASCADE SAS. + +The term "You" shall mean the person or entity identified below, representing the copyright owner or legal entity authorized by the copyright owner that is making this agreement with OPEN CASCADE SAS. For legal entities, the entity making a contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single contributor. For the purposes of this definition, "control" means (i) the power, either direct or indirect, to exert influence on the direction or management of such entity, whether by contract or otherwise, or (ii) the ownership of fifty percent (50%) or more of the outstanding shares, or (iii) the beneficial ownership of such entity. + +Read this CLA carefully before signing and keep a copy for Your records. This CLA, its terms and conditions, constitute a binding legal agreement. + +If You agree to be bound by the terms of this CLA, please complete and sign this CLA where indicated below, then scan and submit the scanned copy as a PDF file to OPEN CASCADE SAS via Your user account section on the Web portal. Alternatively, You may send the signed CLA to OPEN CASCADE SAS by facsimile or in hard copy to the attention of DANIEL BRUNIER-COULIN at OPEN CASCADE SAS headquarters using the contact information provided in the "Contact Us" section. + +1. The term "contribution" or "contributed materials" means any source code, object code, patch, tool, sample, graphic, specification, manual, documentation, any original work of authorship, including any modifications or additions to an existing work or any other material intentionally posted or submitted by You to us. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to OPEN CASCADE SAS or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, OPEN CASCADE SAS for the purpose of, but not limited to, discussing and improving a work or possible integration to future certified releases of OCCT, but excluding communication that is conspicuously marked or otherwise designated in writing by You or OPEN CASCADE SAS as "Not A Contribution" or "NAC". + +2. With respect to any worldwide copyrights, or copyright applications and registrations, in Your contribution: + + a) You hereby assign to OPEN CASCADE SAS joint ownership, and to the extent that such assignment is or becomes invalid, ineffective or unenforceable, You hereby grant to OPEN CASCADE SAS a perpetual, irrevocable, non-exclusive, worldwide, no-charge, royalty-free, unrestricted license to exercise all rights under the intellectual property law and rules in force or under the copyright if chosen by OPEN CASCADE SAS. This includes, at the option of OPEN CASCADE SAS, the right to sublicense these same rights to third parties through multiple levels of sub-licensees or other licensing arrangements; + + b) You agree that OPEN CASCADE SAS can do all things in relation to Your contribution as if OPEN CASCADE SAS were its sole owner, and if OPEN CASCADE SAS makes a derivative work of Your contribution, OPEN CASCADE SAS will be the sole owner of that derivative work; + + c) You agree that You will not assert any moral rights in Your contribution against OPEN CASCADE SAS, our licensees or transferees; + + d) You agree that OPEN CASCADE SAS may register a copyright or any other intellectual property law in force in Your contribution and exercise all ownership rights associated with it; and + + e) You agree that OPEN CASCADE SAS has no duty to consult with, obtain the consent of, pay or render an accounting to You or any third parties for any use or distribution of Your contribution. + +3. With respect to any patents You own, or that You can license without payment to any third party, You hereby grant to OPEN CASCADE SAS a perpetual, irrevocable, non-exclusive, worldwide, no-charge, royalty-free, unrestricted license to: + + a) make, have made, use, sell, offer to sell, import, and otherwise transfer Your contribution in whole or in part, alone or in combination with or included in any product, work or materials arising out of the Product which Your contribution was submitted for; + + b) sublicense these same rights to third parties through multiple levels of sub-licensees or other licensing arrangements; and + + c) reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your contributions and such derivative works. + +4. Except as set out above, You keep all right, title, and interest in Your contribution. The rights that You grant to OPEN CASCADE SAS under these terms are effective on the date You first submitted a contribution to OPEN CASCADE SAS, even if Your submission took place before the date You sign these terms. Any contribution OPEN CASCADE SAS makes available under any license will also be made available under the Open Cascade Technology Public License (OCCTPL) or a suitable FSF (Free Software Foundation) or OSI (Open Source Initiative) approved license, if adopted by OPEN CASCADE SAS. + +5. You covenant, represent and warrant that: + + a) each contribution that You submit is and shall be an original work of authorship and that You can legally grant the rights set out in this CLA; and + + b) each contribution will not violate any third party's copyrights, trademarks, patents, or other intellectual property rights; and + + c) if any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your contribution, or the work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this CLA for that contribution or work shall terminate as of the date such litigation is filed; and + + d) You have received permission to make contributions on behalf of the employer, that Your employer has waived such rights for Your contributions to OPEN CASCADE SAS, or that Your employer (that has rights to intellectual property that You create that includes Your contributions) has executed a separate corporate CLA with OPEN CASCADE SAS. + +6. Should You wish to submit work that is not Your original creation, You may submit it to OPEN CASCADE SAS separately from any contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements), and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]". + +7. You agree to notify OPEN CASCADE SAS if You become aware of any circumstance which would make any of the foregoing representations inaccurate in any respect. OPEN CASCADE SAS may publicly disclose Your contribution to the Product and the fact that You have signed this CLA. + +8. You are not expected to provide support for Your contributions, except to the extent You desire to provide support. + +9. This CLA is governed by the laws of France or an applicable law at the sole written choice of OPEN CASCADE SAS. + +10. You may stop being bound by the terms of this CLA at any time, for any reason, by asking OPEN CASCADE through the Contact Us form. Even after its termination, this CLA still applies to all contributions You made prior to terminating the CLA. On the other hand, if You want to contribute again, You'll need to sign a new CLA. + +[Contributor_License_Agreement.pdf](https://dev.opencascade.org/sites/default/files/Contributor_License_Agreement.pdf) \ No newline at end of file diff --git a/.github/CLA_SIGNING.md b/.github/CLA_SIGNING.md new file mode 100644 index 0000000000..ce1ff7518d --- /dev/null +++ b/.github/CLA_SIGNING.md @@ -0,0 +1,39 @@ +# Signing the Contributor License Agreement + +## In order to contribute code to OCCT, you (or the legal entity you represent) must sign the Contributor License Agreement (CLA). + +### What is the Contributor License Agreement and why is it necessary to sign it? +The Contributor License Agreement is needed to clarify the terms of usage of contributions by OPEN CASCADE SAS and the entire open source community. + +The Contributor License Agreement clarifies the intellectual property rights applicable to contributions. It confirms that the contributor retains ownership of his contributions (the OPEN CASCADE company does not require exclusive copyright transfer for these contributions) and gives all rights to OPEN CASCADE to use the contribution. In turn, OPEN CASCADE guarantees the open source availability of all integrated contributions. + +### How to sign the Contributor License Agreement +Accepting and signing the Contributor License Agreement is a prerequisite for contributing code. To sign the CLA, please register yourself first, and then follow the steps below: +1. Select the "Get Involved" menu +2. Download the Contribution License Agreement pdf file and print it +3. Read the agreement and sign it +4. Scan the signed CLA to a pdf file +5. If not yet done, log on to this website +6. In the CLA sending form, press the "Browse" button +7. Select your signed CLA file +8. Press "Send" + +We will need some time to approve the CLA that you have submitted. You will be notified by e-mail when your CLA is approved and you are assigned the Contributor role. + +### Q&A on the Contribution Agreement + +**I want to contribute code that I developed as part of my job. Can I contribute this code?** + +Yes, but as (under applicable legislation) your employer typically will own all intellectual property that you create as part of your employment, it is important that your employer has consented to your participation and contributions in the OCCT Project. That provides clarity to all parties involved. + +**Can we sign a CLA to enable contributions from several employees in our company?** + +Yes, if your company has several employees ready to contribute, a person representing your company can sign the CLA whereby your employer can specify and manage who is able to contribute from your company. + +**I want to notify the OCCT Project of a bug I found. Can I report this bug?** + +Yes, you simply need to register (you then become a Member) for entering a bug. The bug can be entered using our bug tracker from the Get Involved page. But please note that as a Member of this project, you have accepted the Terms and Conditions of this website, so the materials you provide must conform to these Terms. + +**Can I terminate my Contributor License Agreement?** + +Yes, you may terminate your Contributor License Agreement by sending a written notice through the contact form of this portal. The termination of your CLA will become effective not later than 5 days from the notice date. Please note, however, that all contributions you might have made to the OCCT Project before your CLA termination remain covered by that CLA. \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000000..a8bce65c02 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,41 @@ +# Contributing to OCCT + +## Contribute Code + +In order to contribute code to OCCT, you must register on this [portal](https://dev.opencascade.org/) and sign the Contributor License Agreement (CLA). + +- [Introduction: What is CLA and Why It Is Needed?](CLA_SIGNING.md) +- [Contribution License Agreement](CLA.md) +- [CLA Submission Form](https://dev.opencascade.org/get_involed/cla_submission_form) + +### Steps to Submit Your Contribution +1. **Clone OCCT Git Repository**: See [Guide to installing and using Git for OCCT development](https://dev.opencascade.org/doc/overview/html/occt_contribution__git_guide.html) if you are not familiar with Git. +2. **Develop Your Change**: Ensure it complies with [OCCT Coding Rules](https://dev.opencascade.org/doc/overview/html/occt_contribution__coding_rules.html). +3. **Build and Verify**: Build the modified version of OCCT and verify it works as expected. Consider creating a test case. +4. **Register an Issue**: Register an issue in the [Mantis bug tracker](https://tracker.dev.opencascade.org/login_select_proj_page.php?ref=bug_report_page.php) or [GitHub issues](https://github.com/Open-Cascade-SAS/OCCT/issues) describing your change. +5. **Push Your Change**: Push your change to the Git repository in a branch with a name starting with "CR" followed by the issue ID, then switch the issue to Resolved. + +The contribution then passes code review and testing; if everything is OK, it will be integrated into the master branch in about one week. + +See [Contribution Workflow](https://dev.opencascade.org/doc/overview/html/occt_contribution__contribution_workflow.html) for other possibilities and details on how contributions are processed. + +For more details on integration into GitHub, see the [GitHub Discussions Guide](https://github.com/Open-Cascade-SAS/OCCT/discussions/36). + +## Contribute Ideas + +Every big thing starts with an idea. We appreciate your vision on how to enhance Open CASCADE technology. Share your thoughts on the [OCCT product development forum](https://dev.opencascade.org/forums) or submit your meaningful ideas and bug reports via [Mantis tracker](https://tracker.dev.opencascade.org) or [GitHub issues](https://github.com/Open-Cascade-SAS/OCCT/issues). + +- **Forum**: [OCCT product development forum](https://dev.opencascade.org/forums) +- **Reporting Issues**: [Mantis tracker](https://tracker.dev.opencascade.org) or [GitHub issues](https://github.com/Open-Cascade-SAS/OCCT/issues) + +## Contribute Knowledge + +Know a lot about OCCT? You can help educate other OCCT users by writing OCCT-related articles or blog posts, creating samples, examples, or tutorials, and even by writing a book about OCCT! If you would like us to share your content via official OCCT resources, please [contact us](https://dev.opencascade.org/webform/contact_us). + +## Contribute Documentation and Tutorials + +Do you have an idea on how to make OCCT Documentation easier for new users or even more exhaustive for professionals? Or want to help with proofreading and technical writing? Translating OCCT Documentation and materials into your native language is also very much appreciated. You are always welcome to submit your documentation improvement suggestions via [Mantis tracker](https://tracker.dev.opencascade.org) or [GitHub issues](https://github.com/Open-Cascade-SAS/OCCT/issues).. + +## Contribute to the Community + +At any community interaction points, we value your support in starting forum topics or replying to other users’ posts, joining Open CASCADE social networks, participating in GitHub or Stack Overflow projects, and just spreading the word about OCCT! Welcome to our community! \ No newline at end of file diff --git a/.github/workflows/build-and-test-multiplatform.yml b/.github/workflows/build-and-test-multiplatform.yml index 4b9573ae39..06e590dbc0 100644 --- a/.github/workflows/build-and-test-multiplatform.yml +++ b/.github/workflows/build-and-test-multiplatform.yml @@ -14,783 +14,24 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number }} cancel-in-progress: true -jobs: - prepare-and-build-windows-x64: - name: Prepare and Build on Windows with MSVC (x64) - runs-on: windows-2022 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Set up MSVC environment - - name: Set up MSVC - uses: ilammy/msvc-dev-cmd@v1.13.0 - with: - arch: x64 - - # Step: Download and extract 3rdparty dependencies - - name: Download and extract 3rdparty dependencies - run: | - Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip - Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . - Remove-Item 3rdparty-vc14-64.zip - shell: pwsh - - # Step: Configure OCCT with CMake - - name: Configure OCCT - run: | - mkdir build - cd build - cmake -T host=x64 ` - -D USE_FREETYPE=ON ` - -D USE_TK=OFF ` - -D BUILD_USE_PCH=ON ` - -D BUILD_OPT_PROFILE=Production ` - -D BUILD_INCLUDE_SYMLINK=ON ` - -D CMAKE_BUILD_TYPE=Release ` - -D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 ` - -D INSTALL_DIR=${{ github.workspace }}/install ` - -D USE_DRACO=ON ` - -D USE_FFMPEG=ON ` - -D USE_FREEIMAGE=ON ` - -D USE_GLES2=ON ` - -D USE_OPENVR=ON ` - -D USE_VTK=ON ` - -D USE_TBB=ON ` - -D USE_RAPIDJSON=ON ` - -D USE_OPENGL=ON .. - shell: pwsh - - # Step: Build OCCT - - name: Build OCCT - run: | - cd build - cmake --build . --config Release -- /m - - # Step: Install OCCT - - name: Install OCCT - run: | - cd build - cmake --install . --config Release - - # Step: Upload install directory - - name: Upload install directory - uses: actions/upload-artifact@v4.4.3 - with: - name: install-windows-x64 - path: install - - prepare-and-build-windows-clang-x64: - name: Prepare and Build on Windows with Clang (x64) - runs-on: windows-2022 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Set up MSVC environment - - name: Set up MSVC - uses: ilammy/msvc-dev-cmd@v1.13.0 - with: - arch: x64 - - # Step: Download and extract 3rdparty dependencies - - name: Download and extract 3rdparty dependencies - run: | - Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip - Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . - Remove-Item 3rdparty-vc14-64.zip - shell: pwsh - - # Step: Configure OCCT with CMake - - name: Configure OCCT - run: | - mkdir build - cd build - cmake -G "Ninja" ` - -D CMAKE_C_COMPILER=clang ` - -D CMAKE_CXX_COMPILER=clang++ ` - -D USE_FREETYPE=ON ` - -D USE_TK=OFF ` - -D BUILD_USE_PCH=ON ` - -D BUILD_OPT_PROFILE=Production ` - -D BUILD_INCLUDE_SYMLINK=ON ` - -D CMAKE_BUILD_TYPE=Release ` - -D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 ` - -D INSTALL_DIR=${{ github.workspace }}/install ` - -D USE_DRACO=ON ` - -D USE_FFMPEG=ON ` - -D USE_FREEIMAGE=ON ` - -D USE_GLES2=OFF ` - -D USE_OPENVR=ON ` - -D USE_VTK=OFF ` - -D USE_TBB=ON ` - -D USE_RAPIDJSON=ON ` - -D USE_OPENGL=ON .. - shell: pwsh - - # Step: Build OCCT - - name: Build OCCT - run: | - cd build - cmake --build . --config Release - - # Step: Install OCCT - - name: Install OCCT - run: | - cd build - cmake --install . --config Release - - # Step: Upload install directory - - name: Upload install directory - uses: actions/upload-artifact@v4.4.3 - with: - name: install-windows-clang-x64 - path: install - - prepare-and-build-macos-x64: - name: Prepare and Build on macOS with Clang (x64) - runs-on: macos-15 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Install dependencies using Homebrew - - name: Install dependencies - run: | - brew update - brew install tcl-tk tbb gl2ps xerces-c \ - libxmu libxi libxft libxpm \ - glew - - # Step: Configure OCCT with CMake - - name: Configure OCCT - run: | - mkdir -p build - cd build - cmake -G "Unix Makefiles" \ - -D CMAKE_C_COMPILER=clang \ - -D CMAKE_CXX_COMPILER=clang++ \ - -D USE_FREETYPE=OFF \ - -D BUILD_USE_PCH=ON \ - -D BUILD_INCLUDE_SYMLINK=ON \ - -D CMAKE_BUILD_TYPE=Release \ - -D INSTALL_DIR=${{ github.workspace }}/install .. - - # Step: Build OCCT - - name: Build OCCT - run: | - cd build - make -j$(sysctl -n hw.logicalcpu) - - # Step: Install OCCT - - name: Install OCCT - run: | - cd build - make install - - # Step: Upload install directory - - name: Upload install directory - uses: actions/upload-artifact@v4.4.3 - with: - name: install-macos-x64 - path: install - - prepare-and-build-macos-gcc-x64: - name: Prepare and Build on macOS with GCC (x64) - runs-on: macos-15 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Install dependencies using Homebrew - - name: Install dependencies - run: | - brew update - brew install gcc tcl-tk tbb gl2ps xerces-c \ - libxmu libxi libxft libxpm \ - glew - - # Step: Configure OCCT with CMake - - name: Configure OCCT - run: | - mkdir -p build - cd build - cmake -G "Unix Makefiles" \ - -D CMAKE_C_COMPILER=gcc \ - -D CMAKE_CXX_COMPILER=g++ \ - -D USE_FREETYPE=OFF \ - -D BUILD_USE_PCH=ON \ - -D BUILD_INCLUDE_SYMLINK=ON \ - -D CMAKE_BUILD_TYPE=Release \ - -D INSTALL_DIR=${{ github.workspace }}/install .. - - # Step: Build OCCT - - name: Build OCCT - run: | - cd build - make -j$(sysctl -n hw.logicalcpu) - - # Step: Install OCCT - - name: Install OCCT - run: | - cd build - make install - - # Step: Upload install directory - - name: Upload install directory - uses: actions/upload-artifact@v4.4.3 - with: - name: install-macos-gcc-x64 - path: install - - prepare-and-build-linux-clang-x64: - name: Prepare and Build on Ubuntu with Clang (x64) - runs-on: ubuntu-24.04 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Install dependencies using apt-get - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl - - # Step: Configure OCCT with CMake - - name: Configure OCCT - run: | - mkdir -p build - cd build - cmake -G "Unix Makefiles" \ - -D CMAKE_C_COMPILER=clang \ - -D CMAKE_CXX_COMPILER=clang++ \ - -D BUILD_USE_PCH=ON \ - -D BUILD_INCLUDE_SYMLINK=ON \ - -D BUILD_OPT_PROFILE=Production \ - -D USE_TK=OFF \ - -D USE_FREETYPE=OFF \ - -D CMAKE_BUILD_TYPE=Release \ - -D INSTALL_DIR=${{ github.workspace }}/install .. - - # Step: Build OCCT - - name: Build OCCT - run: | - cd build - make -j"$(nproc)" - - # Step: Install OCCT - - name: Install OCCT - run: | - cd build - make install - - # Step: Upload install directory - - name: Upload install directory - uses: actions/upload-artifact@v4.4.3 - with: - name: install-linux-clang-x64 - path: install - - prepare-and-build-linux-gcc-x64: - name: Prepare and Build on Ubuntu with GCC (x64) - runs-on: ubuntu-24.04 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Install dependencies using apt-get - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl - - # Step: Configure OCCT with CMake - - name: Configure OCCT - run: | - mkdir -p build - cd build - cmake -G "Unix Makefiles" \ - -D CMAKE_C_COMPILER=gcc \ - -D CMAKE_CXX_COMPILER=g++ \ - -D BUILD_USE_PCH=ON \ - -D BUILD_INCLUDE_SYMLINK=ON \ - -D BUILD_OPT_PROFILE=Production \ - -D USE_TK=OFF \ - -D USE_FREETYPE=OFF \ - -D CMAKE_BUILD_TYPE=Release \ - -D INSTALL_DIR=${{ github.workspace }}/install .. - - # Step: Build OCCT - - name: Build OCCT - run: | - cd build - make -j"$(nproc)" - - # Step: Install OCCT - - name: Install OCCT - run: | - cd build - make install - - # Step: Upload install directory - - name: Upload install directory - uses: actions/upload-artifact@v4.4.3 - with: - name: install-linux-gcc-x64 - path: install - - test-windows-x64: - name: Test on Windows (x64) - runs-on: windows-2022 - needs: prepare-and-build-windows-x64 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Set up MSVC environment - - name: Set up MSVC - uses: ilammy/msvc-dev-cmd@v1.13.0 - with: - arch: x64 - - # Step: Download and extract 3rdparty dependencies - - name: Download and extract 3rdparty dependencies - run: | - Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip - Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . - Remove-Item 3rdparty-vc14-64.zip - shell: pwsh - - # Step: Download and extract test data - - name: Download and extract test data - run: | - cd data - Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip - Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath . - Remove-Item opencascade-dataset-7.8.0.zip - shell: pwsh - - # Step: Download and extract install directory - - name: Download and extract install directory - uses: actions/download-artifact@v4.1.7 - with: - name: install-windows-x64 - path: install - - # Step: Run tests - - name: Run tests - run: | - cd install - call env.bat vc14 win64 release - DRAWEXE.exe -v -c testgrid - shell: cmd - env: - CSF_TestScriptsPath: ${{ github.workspace }}/tests - CSF_TestDataPath: ${{ github.workspace }}/data - - # Step: Upload test results - - name: Upload test results - uses: actions/upload-artifact@v4.4.3 - id: artifact-upload-step - with: - name: results-windows-x64 - path: install/results - retention-days: 7 - - test-windows-clang-x64: - name: Test on Windows with Clang (x64) - runs-on: windows-2022 - needs: prepare-and-build-windows-clang-x64 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Set up MSVC environment - - name: Set up MSVC - uses: ilammy/msvc-dev-cmd@v1.13.0 - with: - arch: x64 - - # Step: Download and extract 3rdparty dependencies - - name: Download and extract 3rdparty dependencies - run: | - Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip - Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . - Remove-Item 3rdparty-vc14-64.zip - shell: pwsh - - # Step: Download and extract test data - - name: Download and extract test data - run: | - cd data - Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip - Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath . - Remove-Item opencascade-dataset-7.8.0.zip - shell: pwsh - - # Step: Download and extract install directory - - name: Download and extract install directory - uses: actions/download-artifact@v4.1.7 - with: - name: install-windows-clang-x64 - path: install - - # Step: Run tests - - name: Run tests - run: | - cd install - call env.bat clang win64 release - DRAWEXE.exe -v -c testgrid - shell: cmd - env: - CSF_TestScriptsPath: ${{ github.workspace }}/tests - CSF_TestDataPath: ${{ github.workspace }}/data - - # Step: Upload test results - - name: Upload test results - uses: actions/upload-artifact@v4.4.3 - id: artifact-upload-step - with: - name: results-windows-clang-x64 - path: install/results - retention-days: 7 - - test-macos-x64: - name: Test on macOS (x64) - runs-on: macos-15 - needs: prepare-and-build-macos-x64 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Install dependencies for headless OpenGL - - name: Install dependencies for headless OpenGL - run: | - brew update - brew install mesalib-glw - - # Step: Download test data - - name: Download test data - run: | - cd data - curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz - tar -xf opencascade-dataset-7.8.0.tar.xz - - # Step: Download and extract install directory - - name: Download and extract install directory - uses: actions/download-artifact@v4.1.7 - with: - name: install-macos-x64 - path: install - - # Step: Set LIBGL_ALWAYS_SOFTWARE environment variable - - name: Set LIBGL_ALWAYS_SOFTWARE environment variable - run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV - - # Step: Set execute permissions on DRAWEXE - - name: Set execute permissions on DRAWEXE - run: chmod +x install/bin/DRAWEXE - - # Step: Run tests - - name: Run tests - run: | - cd install - cd bin - source env.sh - ./DRAWEXE -v -c testgrid - shell: bash - env: - LIBGL_ALWAYS_SOFTWARE: 1 - CSF_TestScriptsPath: ${{ github.workspace }}/tests - CSF_TestDataPath: ${{ github.workspace }}/data - - # Step: Upload test results - - name: Upload test results - uses: actions/upload-artifact@v4.4.3 - id: artifact-upload-step - with: - name: results-macos-x64 - path: install/bin/results - retention-days: 7 - - test-macos-gcc-x64: - name: Test on macOS with GCC (x64) - runs-on: macos-15 - needs: prepare-and-build-macos-gcc-x64 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Install dependencies for headless OpenGL - - name: Install dependencies for headless OpenGL - run: | - brew update - brew install mesalib-glw - - # Step: Download test data - - name: Download test data - run: | - cd data - curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz - tar -xf opencascade-dataset-7.8.0.tar.xz - - # Step: Download and extract install directory - - name: Download and extract install directory - uses: actions/download-artifact@v4.1.7 - with: - name: install-macos-gcc-x64 - path: install - - # Step: Set LIBGL_ALWAYS_SOFTWARE environment variable - - name: Set LIBGL_ALWAYS_SOFTWARE environment variable - run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV - - # Step: Set execute permissions on DRAWEXE - - name: Set execute permissions on DRAWEXE - run: chmod +x install/bin/DRAWEXE - - # Step: Run tests - - name: Run tests - run: | - cd install - cd bin - source env.sh - ./DRAWEXE -v -c testgrid - shell: bash - env: - LIBGL_ALWAYS_SOFTWARE: 1 - CSF_TestScriptsPath: ${{ github.workspace }}/tests - CSF_TestDataPath: ${{ github.workspace }}/data - - # Step: Upload test results - - name: Upload test results - uses: actions/upload-artifact@v4.4.3 - id: artifact-upload-step - with: - name: results-macos-gcc-x64 - path: install/bin/results - retention-days: 7 - - test-linux-clang-x64: - name: Test on Linux with Clang (x64) - runs-on: ubuntu-24.04 - needs: prepare-and-build-linux-clang-x64 - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Install dependencies using apt-get - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl - - # Step: Install Xvfb and Mesa - - name: Install Xvfb and Mesa - run: | - sudo apt-get update - sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri - - # Step: Start Xvfb - - name: Start Xvfb - run: Xvfb :99 -screen 0 1920x1080x24 & - - # Step: Set DISPLAY environment variable - - name: Set DISPLAY environment variable - run: echo "DISPLAY=:99" >> $GITHUB_ENV - - # Step: Download test data - - name: Download test data - run: | - cd data - wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz - tar -xf opencascade-dataset-7.8.0.tar.xz - - # Step: Download and extract install directory - - name: Download and extract install directory - uses: actions/download-artifact@v4.1.7 - with: - name: install-linux-clang-x64 - path: install - - # Step: Set LIBGL_ALWAYS_SOFTWARE environment variable - - name: Set LIBGL_ALWAYS_SOFTWARE environment variable - run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV - - # Step: Set execute permissions on DRAWEXE - - name: Set execute permissions on DRAWEXE - run: chmod +x install/bin/DRAWEXE - - # Step: Run tests - - name: Run tests - run: | - cd install - cd bin - source env.sh - ./DRAWEXE -v -c testgrid - shell: bash - env: - DISPLAY: :99 - LIBGL_ALWAYS_SOFTWARE: 1 - CSF_TestScriptsPath: ${{ github.workspace }}/tests - CSF_TestDataPath: ${{ github.workspace }}/data - - # Step: Upload test results - - name: Upload test results - uses: actions/upload-artifact@v4.4.3 - id: artifact-upload-step - with: - name: results-linux-clang-x64 - path: install/bin/results - retention-days: 7 - - test-linux-gcc-x64: - name: Test on Linux with GCC (x64) - runs-on: ubuntu-24.04 - needs: prepare-and-build-linux-gcc-x64 +permissions: + issues: write + pull-requests: write +jobs: + comment: + runs-on: ubuntu-latest steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Install dependencies using apt-get - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl - - # Step: Install Xvfb and Mesa - - name: Install Xvfb and Mesa - run: | - sudo apt-get update - sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri - - # Step: Start Xvfb - - name: Start Xvfb - run: Xvfb :99 -screen 0 1920x1080x24 & - - # Step: Set DISPLAY environment variable - - name: Set DISPLAY environment variable - run: echo "DISPLAY=:99" >> $GITHUB_ENV - - # Step: Download test data - - name: Download test data - run: | - cd data - wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz - tar -xf opencascade-dataset-7.8.0.tar.xz - - # Step: Download and extract install directory - - name: Download and extract install directory - uses: actions/download-artifact@v4.1.7 - with: - name: install-linux-gcc-x64 - path: install - - # Step: Set LIBGL_ALWAYS_SOFTWARE environment variable - - name: Set LIBGL_ALWAYS_SOFTWARE environment variable - run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV - - # Step: Set execute permissions on DRAWEXE - - name: Set execute permissions on DRAWEXE - run: chmod +x install/bin/DRAWEXE - - # Step: Run tests - - name: Run tests - run: | - cd install - cd bin - source env.sh - ./DRAWEXE -v -c testgrid - shell: bash - env: - DISPLAY: :99 - LIBGL_ALWAYS_SOFTWARE: 1 - CSF_TestScriptsPath: ${{ github.workspace }}/tests - CSF_TestDataPath: ${{ github.workspace }}/data - - # Step: Upload test results - - name: Upload test results - uses: actions/upload-artifact@v4.4.3 - id: artifact-upload-step - with: - name: results-linux-gcc-x64 - path: install/bin/results - retention-days: 7 - - summarize: - name: Summarize and Send PR Message - runs-on: ubuntu-24.04 - needs: [test-windows-x64, test-windows-clang-x64, test-macos-x64, test-macos-gcc-x64, test-linux-clang-x64, test-linux-gcc-x64] - - steps: - # Step: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - # Step: Download all test results (Windows x64) - - name: Download all test results (Windows x64) - uses: actions/download-artifact@v4.1.7 - with: - name: results-windows-x64 - path: results/windows-x64 - - # Step: Download all test results (Windows Clang x64) - - name: Download all test results (Windows Clang x64) - uses: actions/download-artifact@v4.1.7 - with: - name: results-windows-clang-x64 - path: results/windows-clang-x64 - - # Step: Download all test results (macOS x64) - - name: Download all test results (macOS x64) - uses: actions/download-artifact@v4.1.7 - with: - name: results-macos-x64 - path: results/macos-x64 - - # Step: Download all test results (macOS GCC x64) - - name: Download all test results (macOS GCC x64) - uses: actions/download-artifact@v4.1.7 - with: - name: results-macos-gcc-x64 - path: results/macos-gcc-x64 - - # Step: Download all test results (Linux Clang x64) - - name: Download all test results (Linux Clang x64) - uses: actions/download-artifact@v4.1.7 - with: - name: results-linux-clang-x64 - path: results/linux-clang-x64 - - # Step: Download all test results (Linux GCC x64) - - name: Download all test results (Linux GCC x64) - uses: actions/download-artifact@v4.1.7 + - name: Post message if unauthorized + uses: actions/github-script@v4 with: - name: results-linux-gcc-x64 - path: results/linux-gcc-x64 - - # Step: Summarize results - - name: Summarize results - run: | - echo "Summarizing results..." - - # Step: Send PR message - - name: Send PR message - run: | - echo "Sending PR message..." + github-token: ${{ secrets.GITHUB_TOKEN }} # Use the PAT here + script: | + const issue_number = context.issue.number; + const message = `It appears that you have not signed our Contributor License Agreement (CLA). Please sign the CLA to proceed. You can find the CLA and instructions on how to sign it on our [DevPortal](https://dev.opencascade.org/get_involved). If you have already signed the CLA, please provide your CLA number and Github profile's ID(s) in the "Contact Us" form. Thank you for your contribution!`; + github.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue_number, + body: message + });