Skip to content

Commit

Permalink
append yml suite
Browse files Browse the repository at this point in the history
  • Loading branch information
delahaye-4D committed Aug 19, 2024
1 parent ce612c4 commit b365599
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/generate_release_notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
changelog:
categories:
- title: 🏕 Features
labels:
- features
- user story
- title: 👒 Bugs
labels:
- bug
-title: 🎨 Improvements
labels:
- enhancement
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>
81 changes: 81 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: build
on:
push:
paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**']
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
paths-ignore: ['**.md', '.vscode/**','docs/**','pictures/**']
workflow_dispatch:

env:
TOOL4D_PRODUCT_LINE: '20Rx'
TOOL4D_VERSION: '20R5'

jobs:
build:
name: "Build on ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [ ARM64, X64 ]
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: 🏗️ Build ${{ github.event.repository.name }}
uses: 4d/build4d-action@main
with:
project: ${{ github.event.repository.name }}/Project/${{ github.event.repository.name }}.4DProject
product-line: ${{env.TOOL4D_PRODUCT_LINE}}
version: ${{env.TOOL4D_VERSION}}
build: official
actions: "build,pack"
token: ${{ secrets.DLTK }}

- name: 🚚 Copy ${{ github.event.repository.name }}.4dbase to ${{ github.event.repository.name }}_UnitTests/Components directory
run: |
cp -r ${{ github.event.repository.name }}/build/ ${{ github.event.repository.name }}_UnitTests/Components
- name: 🏗️ Build ${{ github.event.repository.name }}_UnitTests
uses: 4d/build4d-action@main
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: official
actions: "build"
token: ${{ secrets.DLTK }}

- name: 🧪 Run Unit Tests
uses: 4d/tool4d-action@main
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: official
token: ${{ secrets.DLTK }}
startup-method: start_tests

- 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-QPDF.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
79 changes: 79 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Release
on:
release:
types: [published]

permissions:
contents: write
packages: write

env:
TOOL4D_PRODUCT_LINE: '20Rx'
TOOL4D_VERSION: '20R5'

jobs:
build:
name: "Build"
runs-on: [self-hosted,ARM64]
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: 🏗️ Build ${{ github.event.repository.name }}
uses: 4d/build4d-action@main
with:
project: ${{ github.event.repository.name }}/Project/${{ github.event.repository.name }}.4DProject
product-line: ${{env.TOOL4D_PRODUCT_LINE}}
version: ${{env.TOOL4D_VERSION}}
build: official
targets : all
actions: "build,pack,sign,archive"
sign-files: "Helpers/qpdf/mac/ub/bin/qpdf"
sign-certificate: "Developer ID Application: 4D"
token: ${{ secrets.DLTK }}

- 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 }}

0 comments on commit b365599

Please sign in to comment.