Skip to content

Add files via upload #9

Add files via upload

Add files via upload #9

Workflow file for this run

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