Skip to content
Merged

Ci #9

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2a8d4de
Add GitHub Actions workflow for building and testing
pfhuillet Jun 16, 2025
0078d22
Fix paths in GitHub Actions workflow for consistency and accuracy
pfhuillet Jun 16, 2025
2ce0816
FIx path
pfhuillet Jun 16, 2025
fac0b73
Fix repository references in GitHub Actions workflow
pfhuillet Jun 16, 2025
2a01cfa
FIX : tool4d token
pfhuillet Jun 16, 2025
aeca2df
Fix TOOL4D environment variables in GitHub Actions workflow
pfhuillet Jun 19, 2025
c8584e7
Fix path for copying build artifacts to UnitTests directory in GitHub…
pfhuillet Jun 26, 2025
687f07b
Fix copy command for UnitTests directory in GitHub Actions workflow
pfhuillet Jun 26, 2025
4e92557
Update startup method to run automatic unit tests in GitHub Actions w…
pfhuillet Jun 26, 2025
b519082
Fix unit tests execution and update token reference in GitHub Actions…
pfhuillet Jun 26, 2025
96d97d7
Enhance GitHub Actions workflow by adding setup4d-action checkout and…
pfhuillet Sep 16, 2025
55ee79a
Fix token reference for Setup4D in GitHub Actions workflow
pfhuillet Sep 16, 2025
6db9fc5
Update environment variables in GitHub Actions workflow to use main p…
pfhuillet Sep 16, 2025
424b359
Update environment variables in GitHub Actions workflow to reflect cu…
pfhuillet Sep 16, 2025
c083073
Update environment variables for Setup4D in GitHub Actions workflow a…
pfhuillet Sep 16, 2025
740e5ea
Update Setup4D environment variables in GitHub Actions workflow for c…
pfhuillet Sep 16, 2025
9e76e52
Refactor Setup4D preparation step in GitHub Actions workflow for impr…
pfhuillet Sep 16, 2025
0a919b8
Refactor Setup4D workflow steps for improved clarity and update paths…
pfhuillet Sep 16, 2025
6c03d25
Update paths in UT_Settings.json for consistency and remove unnecessa…
pfhuillet Sep 16, 2025
8c9da03
Disable UnitTest Running
pfhuillet Sep 17, 2025
347b88c
Refactor GitHub Actions workflows: update build.yml for naming consis…
pfhuillet Sep 17, 2025
38629e4
Update build.yml: add comments for clarity on branch and tag handling
pfhuillet Sep 17, 2025
a2b1a4b
Update release.yml: change macOS runner to macos-latest for consisten…
pfhuillet Sep 17, 2025
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
32 changes: 32 additions & 0 deletions .github/workflows/4D.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.automation.apple-events</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.personal-information.addressbook</key>
<true/>
<key>com.apple.security.personal-information.calendars</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
<key>com.apple.security.personal-information.photos-library</key>
<true/>
</dict>
</plist>
130 changes: 130 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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





101 changes: 101 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
12 changes: 6 additions & 6 deletions Build4D_UnitTests/Settings/UT_Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",

Expand Down
Loading