Skip to content

Commit 831456e

Browse files
authored
Merge pull request #9 from 4d-depot/CI
Ci
2 parents e19e01f + a2b1a4b commit 831456e

File tree

4 files changed

+269
-6
lines changed

4 files changed

+269
-6
lines changed

.github/workflows/4D.entitlements

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.automation.apple-events</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
8+
<true/>
9+
<key>com.apple.security.cs.allow-jit</key>
10+
<true/>
11+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
12+
<true/>
13+
<key>com.apple.security.cs.debugger</key>
14+
<true/>
15+
<key>com.apple.security.cs.disable-executable-page-protection</key>
16+
<true/>
17+
<key>com.apple.security.cs.disable-library-validation</key>
18+
<true/>
19+
<key>com.apple.security.device.audio-input</key>
20+
<true/>
21+
<key>com.apple.security.device.camera</key>
22+
<true/>
23+
<key>com.apple.security.personal-information.addressbook</key>
24+
<true/>
25+
<key>com.apple.security.personal-information.calendars</key>
26+
<true/>
27+
<key>com.apple.security.personal-information.location</key>
28+
<true/>
29+
<key>com.apple.security.personal-information.photos-library</key>
30+
<true/>
31+
</dict>
32+
</plist>

.github/workflows/build.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: ['**'] # Only run on branches
6+
tags-ignore: ['*'] # Ignore all tags
7+
paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**']
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**']
11+
12+
env:
13+
TOOL4D_PRODUCT_LINE: '20Rx'
14+
TOOL4D_VERSION: '20R10'
15+
TOOL4D_BUILDNUMBER : '100221'
16+
SETUP4D_PRODUCT_LINE: 'Rx'
17+
SETUP4D_VERSION: '20R10'
18+
SETUP4D_BUILDNUMBER : '100221'
19+
20+
jobs:
21+
build:
22+
name: "Build on ${{ matrix.os }}"
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: [ windows-latest,macos-latest]
27+
28+
29+
runs-on: ${{ matrix.os }}
30+
steps:
31+
- name: 📄 Checkout repository
32+
uses: actions/checkout@v4
33+
with:
34+
lfs: true
35+
# Disabling shallow clone is recommended for improving relevancy of reporting
36+
fetch-depth: 0
37+
38+
39+
- name: Checkout build4d-action
40+
uses: actions/checkout@v4
41+
with:
42+
repository: 4d/build4d-action
43+
token: ${{ secrets.GH_4D_ACTION_TOKEN }}
44+
path: .github/actions/build4d-action
45+
46+
- name: Checkout tool4d-action
47+
uses: actions/checkout@v4
48+
with:
49+
repository: 4d/tool4d-action
50+
token: ${{ secrets.GH_4D_ACTION_TOKEN }}
51+
path: .github/actions/tool4d-action
52+
53+
- name: Checkout setup4d-action
54+
uses: actions/checkout@v4
55+
with:
56+
repository: 4d/setup4d-action
57+
token: ${{ secrets.GH_4D_ACTION_TOKEN }}
58+
path: .github/actions/setup4d-action
59+
60+
61+
- name: 🏗️ Build ${{ github.event.repository.name }}
62+
uses: ./.github/actions/build4d-action
63+
with:
64+
project: ${{ github.workspace }}/${{ github.event.repository.name }}/Project/${{ github.event.repository.name }}.4DProject
65+
product-line: ${{env.TOOL4D_PRODUCT_LINE}}
66+
version: ${{env.TOOL4D_VERSION}}
67+
actions: "build,pack"
68+
build: ${{env.TOOL4D_BUILDNUMBER}}
69+
token: ${{ secrets.TOOL4D_DL_TOKEN }}
70+
ignore-warnings: true
71+
72+
- name: 🚚 Copy ${{ github.event.repository.name }}.4dbase to ${{ github.event.repository.name }}_UnitTests/Components directory
73+
run: |
74+
cp -r ${{ github.workspace }}/${{ github.event.repository.name }}/build/ ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Components
75+
76+
- name: Download Setup4d
77+
uses: ./.github/actions/setup4d-action
78+
with:
79+
product-line: ${{env.SETUP4D_PRODUCT_LINE}}
80+
version: ${{env.SETUP4D_VERSION}}
81+
build-number: ${{env.SETUP4D_BUILDNUMBER}}
82+
token: ${{ secrets.SETUP4D_DL_TOKEN }}
83+
84+
- name: Move 4DSetup work directory to UnitTests project Work directory
85+
run: |
86+
mv ${{ github.workspace }}/.github/actions/setup4d-action/work/ ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Work/
87+
88+
- name: 🏗️ Build ${{ github.event.repository.name }}_UnitTests
89+
uses: ./.github/actions/build4d-action
90+
with:
91+
project: ${{ github.workspace }}/${{ github.event.repository.name }}_UnitTests/Project/${{ github.event.repository.name }}_UnitTests.4DProject
92+
product-line: ${{env.TOOL4D_PRODUCT_LINE}}
93+
version: ${{env.TOOL4D_VERSION}}
94+
build: ${{env.TOOL4D_BUILDNUMBER}}
95+
actions: "build"
96+
token: ${{ secrets.TOOL4D_DL_TOKEN }}
97+
ignore-warnings: true
98+
99+
#- name: 🧪 Run Unit Tests
100+
# uses: ./.github/actions/tool4d-action
101+
# with:
102+
# project: ${{ github.event.repository.name }}_UnitTests/Project/${{ github.event.repository.name }}_UnitTests.4DProject
103+
# product-line: ${{env.TOOL4D_PRODUCT_LINE}}
104+
# version: ${{env.TOOL4D_VERSION}}
105+
# build: ${{env.TOOL4D_BUILDNUMBER}}
106+
# token: ${{ secrets.TOOL4D_DL_TOKEN }}
107+
# startup-method: runAutomaticUnitTests
108+
109+
#- name : 🚢 Archive Actifacts
110+
# uses: actions/upload-artifact@v4
111+
# with:
112+
# name: "UT-${{ github.event.repository.name }}.${{runner.os}}.text"
113+
# path: "UT-${{ github.event.repository.name }}.txt"
114+
115+
# Recherche de la chaîne "GLOBAL RESULT : SUCCESS" dans le fichier UT-${{ github.event.repository.name }}.txt
116+
#- name : ✔ Analyze result test
117+
# shell: bash
118+
# run: |
119+
# if grep -r "GLOBAL RESULT : SUCCESS" "UT-${{ github.event.repository.name }}.txt"; then
120+
# echo "Unit tests passed"
121+
# exit 0
122+
# else
123+
# echo "Unit tests failed"
124+
# exit 1
125+
# fi
126+
127+
128+
129+
130+

.github/workflows/release.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
6+
permissions:
7+
contents: write
8+
packages: write
9+
10+
env:
11+
TOOL4D_PRODUCT_LINE: '20Rx'
12+
TOOL4D_VERSION: '20R10'
13+
TOOL4D_BUILDNUMBER : '100221'
14+
15+
16+
jobs:
17+
build:
18+
name: "Build"
19+
runs-on: [macos-latest]
20+
steps:
21+
- name: 📄 Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
lfs: true
25+
# Disabling shallow clone is recommended for improving relevancy of reporting
26+
fetch-depth: 0
27+
28+
- name: Checkout build4d-action
29+
uses: actions/checkout@v4
30+
with:
31+
repository: 4d/build4d-action
32+
token: ${{ secrets.GH_4D_ACTION_TOKEN }}
33+
path: .github/actions/build4d-action
34+
35+
- name: Checkout tool4d-action
36+
uses: actions/checkout@v4
37+
with:
38+
repository: 4d/tool4d-action
39+
token: ${{ secrets.GH_4D_ACTION_TOKEN }}
40+
path: .github/actions/tool4d-action
41+
42+
43+
- name: 🏗️ Build ${{ github.event.repository.name }}
44+
uses: ./.github/actions/build4d-action
45+
with:
46+
project: ${{ github.workspace }}/${{ github.event.repository.name }}/Project/${{ github.event.repository.name }}.4DProject
47+
product-line: ${{env.TOOL4D_PRODUCT_LINE}}
48+
version: ${{env.TOOL4D_VERSION}}
49+
targets : all
50+
#actions: "build,pack,sign,archive"
51+
actions: "build,pack,archive"
52+
build: ${{env.TOOL4D_BUILDNUMBER}}
53+
token: ${{ secrets.TOOL4D_DL_TOKEN }}
54+
ignore-warnings: true
55+
56+
57+
#- name: Notarize
58+
# run: |
59+
# xcrun notarytool submit "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip" --keychain-profile "notary" --wait >> notary_tool.log
60+
# if grep -r "status: Accepted" "notary_tool.log"; then
61+
# echo "Notarize Success"
62+
# exit 0
63+
# else
64+
# echo "Notarize Failed"
65+
# exit 1
66+
# fi
67+
68+
- name: Upload Artifact
69+
if: github.event_name != 'pull_request'
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: "${{ github.event.repository.name }}.zip"
73+
path: "${{ github.event.repository.name }}/build/${{ github.event.repository.name }}.zip"
74+
retention-days: 1
75+
if-no-files-found: error
76+
release:
77+
needs: build
78+
name: "Release Component"
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: 📄 Checkout repository
82+
uses: actions/checkout@v4
83+
with:
84+
lfs: true
85+
# Disabling shallow clone is recommended for improving relevancy of reporting
86+
fetch-depth: 0
87+
88+
- name: Download packages
89+
uses: actions/download-artifact@v4
90+
with:
91+
name: "${{ github.event.repository.name }}.zip"
92+
path: artifact
93+
94+
- name: Display Artifact Directory Content
95+
run: ls -R artifact
96+
97+
- name: 📦 release package
98+
run: |
99+
gh release upload ${{github.event.release.tag_name}} "${{github.workspace}}/artifact/${{ github.event.repository.name }}.zip"
100+
env:
101+
GITHUB_TOKEN: ${{ github.TOKEN }}

Build4D_UnitTests/Settings/UT_Settings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
"invalid_licenseServer":"/PACKAGE/Settings/invalid_4DSRV20x.license4D",
99
"invalid_xmlKeyLicense":"/PACKAGE/Settings/invalid_4DOEM20x.license4D",
10-
11-
"macVolumeDesktop":"/Applications/4D v20.2/4D Volume Desktop.app/",
12-
"winVolumeDesktop":"C:/Program Files/4D/4D v20.2/4D Volume Desktop WIN/",
10+
11+
"macVolumeDesktop":"/PACKAGE/Work/4D Volume Desktop/4D Volume Desktop.app/",
12+
"winVolumeDesktop":"/PACKAGE/Work/4D Volume Desktop/4D Volume Desktop.exe",
1313
"invalid_macVolumeDesktop":"/Applications/4D v0.0/4D Volume Desktop.app/",
1414
"invalid_winVolumeDesktop":"C:/Program Files/4D/4D v0.0/4D Volume Desktop/",
15-
16-
"macServer":"/Applications/4D v20.2/4D Server.app/",
17-
"winServer":"/Applications/4D v20.2/4D Server WIN/4D Server.app/",
15+
16+
"macServer":"/PACKAGE/Work/4D Server/4D Server.app/",
17+
"winServer":"/PACKAGE/Work/4D Server/4D Server.exe",
1818
"invalid_macServer":"/Applications/4D v0.0/4D Server.app/",
1919
"invalid_winServer":"C:/Program Files/4D/4D v0.0/4D Server/",
2020

0 commit comments

Comments
 (0)