diff --git a/.github/workflows/4D.entitlements b/.github/workflows/4D.entitlements new file mode 100644 index 0000000..3913128 --- /dev/null +++ b/.github/workflows/4D.entitlements @@ -0,0 +1,32 @@ + + + + + com.apple.security.automation.apple-events + + com.apple.security.cs.allow-dyld-environment-variables + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.debugger + + com.apple.security.cs.disable-executable-page-protection + + com.apple.security.cs.disable-library-validation + + com.apple.security.device.audio-input + + com.apple.security.device.camera + + com.apple.security.personal-information.addressbook + + com.apple.security.personal-information.calendars + + com.apple.security.personal-information.location + + com.apple.security.personal-information.photos-library + + + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4c83b4e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,130 @@ +name: Build + +on: + push: + branches: ['**'] # Only run on branches + tags-ignore: ['*'] # Ignore all tags + paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**'] + pull_request: + types: [opened, synchronize, reopened] + paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**'] + +env: + TOOL4D_PRODUCT_LINE: '20Rx' + TOOL4D_VERSION: '20R10' + TOOL4D_BUILDNUMBER : '100221' + SETUP4D_PRODUCT_LINE: 'Rx' + SETUP4D_VERSION: '20R10' + SETUP4D_BUILDNUMBER : '100221' + +jobs: + build: + name: "Build on ${{ matrix.os }}" + strategy: + fail-fast: false + matrix: + os: [ windows-latest,macos-latest] + + + runs-on: ${{ matrix.os }} + steps: + - name: ๐Ÿ“„ Checkout repository + uses: actions/checkout@v4 + with: + lfs: true + # Disabling shallow clone is recommended for improving relevancy of reporting + fetch-depth: 0 + + + - name: Checkout build4d-action + uses: actions/checkout@v4 + with: + repository: 4d/build4d-action + token: ${{ secrets.GH_4D_ACTION_TOKEN }} + path: .github/actions/build4d-action + + - name: Checkout tool4d-action + uses: actions/checkout@v4 + with: + repository: 4d/tool4d-action + token: ${{ secrets.GH_4D_ACTION_TOKEN }} + path: .github/actions/tool4d-action + + - name: Checkout setup4d-action + uses: actions/checkout@v4 + with: + repository: 4d/setup4d-action + token: ${{ secrets.GH_4D_ACTION_TOKEN }} + path: .github/actions/setup4d-action + + + - name: ๐Ÿ—๏ธ Build ${{ github.event.repository.name }} + uses: ./.github/actions/build4d-action + with: + project: ${{ github.workspace }}/${{ github.event.repository.name }}/Project/${{ github.event.repository.name }}.4DProject + product-line: ${{env.TOOL4D_PRODUCT_LINE}} + version: ${{env.TOOL4D_VERSION}} + actions: "build,pack" + build: ${{env.TOOL4D_BUILDNUMBER}} + token: ${{ secrets.TOOL4D_DL_TOKEN }} + ignore-warnings: true + + - name: ๐Ÿšš Copy ${{ github.event.repository.name }}.4dbase to ${{ github.event.repository.name }}_UnitTests/Components directory + run: | + cp -r ${{ github.workspace }}/${{ github.event.repository.name }}/build/ ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Components + + - name: Download Setup4d + uses: ./.github/actions/setup4d-action + with: + product-line: ${{env.SETUP4D_PRODUCT_LINE}} + version: ${{env.SETUP4D_VERSION}} + build-number: ${{env.SETUP4D_BUILDNUMBER}} + token: ${{ secrets.SETUP4D_DL_TOKEN }} + + - name: Move 4DSetup work directory to UnitTests project Work directory + run: | + mv ${{ github.workspace }}/.github/actions/setup4d-action/work/ ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Work/ + + - name: ๐Ÿ—๏ธ Build ${{ github.event.repository.name }}_UnitTests + uses: ./.github/actions/build4d-action + with: + project: ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Project/${{ github.event.repository.name }}_UnitTests.4DProject + product-line: ${{env.TOOL4D_PRODUCT_LINE}} + version: ${{env.TOOL4D_VERSION}} + build: ${{env.TOOL4D_BUILDNUMBER}} + actions: "build" + token: ${{ secrets.TOOL4D_DL_TOKEN }} + ignore-warnings: true + + #- name: ๐Ÿงช Run Unit Tests + # uses: ./.github/actions/tool4d-action + # with: + # project: ${{ github.event.repository.name }}_UnitTests/Project/${{ github.event.repository.name }}_UnitTests.4DProject + # product-line: ${{env.TOOL4D_PRODUCT_LINE}} + # version: ${{env.TOOL4D_VERSION}} + # build: ${{env.TOOL4D_BUILDNUMBER}} + # token: ${{ secrets.TOOL4D_DL_TOKEN }} + # startup-method: runAutomaticUnitTests + + #- name : ๐Ÿšข Archive Actifacts + # uses: actions/upload-artifact@v4 + # with: + # name: "UT-${{ github.event.repository.name }}.${{runner.os}}.text" + # path: "UT-${{ github.event.repository.name }}.txt" + + # Recherche de la chaรฎne "GLOBAL RESULT : SUCCESS" dans le fichier UT-${{ github.event.repository.name }}.txt + #- name : โœ” Analyze result test + # shell: bash + # run: | + # if grep -r "GLOBAL RESULT : SUCCESS" "UT-${{ github.event.repository.name }}.txt"; then + # echo "Unit tests passed" + # exit 0 + # else + # echo "Unit tests failed" + # exit 1 + # fi + + + + + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5e52052 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,101 @@ +name: Release +on: + release: + types: [published] + +permissions: + contents: write + packages: write + +env: + TOOL4D_PRODUCT_LINE: '20Rx' + TOOL4D_VERSION: '20R10' + TOOL4D_BUILDNUMBER : '100221' + + +jobs: + build: + name: "Build" + runs-on: [macos-latest] + steps: + - name: ๐Ÿ“„ Checkout repository + uses: actions/checkout@v4 + with: + lfs: true + # Disabling shallow clone is recommended for improving relevancy of reporting + fetch-depth: 0 + + - name: Checkout build4d-action + uses: actions/checkout@v4 + with: + repository: 4d/build4d-action + token: ${{ secrets.GH_4D_ACTION_TOKEN }} + path: .github/actions/build4d-action + + - name: Checkout tool4d-action + uses: actions/checkout@v4 + with: + repository: 4d/tool4d-action + token: ${{ secrets.GH_4D_ACTION_TOKEN }} + path: .github/actions/tool4d-action + + + - name: ๐Ÿ—๏ธ Build ${{ github.event.repository.name }} + uses: ./.github/actions/build4d-action + with: + project: ${{ github.workspace }}/${{ github.event.repository.name }}/Project/${{ github.event.repository.name }}.4DProject + product-line: ${{env.TOOL4D_PRODUCT_LINE}} + version: ${{env.TOOL4D_VERSION}} + targets : all + #actions: "build,pack,sign,archive" + actions: "build,pack,archive" + build: ${{env.TOOL4D_BUILDNUMBER}} + token: ${{ secrets.TOOL4D_DL_TOKEN }} + ignore-warnings: true + + + #- name: Notarize + # run: | + # xcrun notarytool submit "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip" --keychain-profile "notary" --wait >> notary_tool.log + # if grep -r "status: Accepted" "notary_tool.log"; then + # echo "Notarize Success" + # exit 0 + # else + # echo "Notarize Failed" + # exit 1 + # fi + + - name: Upload Artifact + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: "${{ github.event.repository.name }}.zip" + path: "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip" + retention-days: 1 + if-no-files-found: error + release: + needs: build + name: "Release Component" + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ“„ Checkout repository + uses: actions/checkout@v4 + with: + lfs: true + # Disabling shallow clone is recommended for improving relevancy of reporting + fetch-depth: 0 + + - name: Download packages + uses: actions/download-artifact@v4 + with: + name: "${{ github.event.repository.name }}.zip" + path: artifact + + - name: Display Artifact Directory Content + run: ls -R artifact + + - name: ๐Ÿ“ฆ release package + run: | + gh release upload ${{github.event.release.tag_name}} "${{github.workspace}}/artifact/${{ github.event.repository.name }}.zip" + env: + GITHUB_TOKEN: ${{ github.TOKEN }} diff --git a/Build4D_UnitTests/Settings/UT_Settings.json b/Build4D_UnitTests/Settings/UT_Settings.json index 11d62f7..a50fc91 100644 --- a/Build4D_UnitTests/Settings/UT_Settings.json +++ b/Build4D_UnitTests/Settings/UT_Settings.json @@ -7,14 +7,14 @@ "invalid_licenseServer":"/PACKAGE/Settings/invalid_4DSRV20x.license4D", "invalid_xmlKeyLicense":"/PACKAGE/Settings/invalid_4DOEM20x.license4D", - - "macVolumeDesktop":"/Applications/4D v20.2/4D Volume Desktop.app/", - "winVolumeDesktop":"C:/Program Files/4D/4D v20.2/4D Volume Desktop WIN/", + + "macVolumeDesktop":"/PACKAGE/Work/4D Volume Desktop/4D Volume Desktop.app/", + "winVolumeDesktop":"/PACKAGE/Work/4D Volume Desktop/4D Volume Desktop.exe", "invalid_macVolumeDesktop":"/Applications/4D v0.0/4D Volume Desktop.app/", "invalid_winVolumeDesktop":"C:/Program Files/4D/4D v0.0/4D Volume Desktop/", - - "macServer":"/Applications/4D v20.2/4D Server.app/", - "winServer":"/Applications/4D v20.2/4D Server WIN/4D Server.app/", + + "macServer":"/PACKAGE/Work/4D Server/4D Server.app/", + "winServer":"/PACKAGE/Work/4D Server/4D Server.exe", "invalid_macServer":"/Applications/4D v0.0/4D Server.app/", "invalid_winServer":"C:/Program Files/4D/4D v0.0/4D Server/",