This action install the wanted tool4d to launch your 4D code.
The parametrised URL used to download the tool4d is:
https://resources-download.4d.com/release/<product-line>/<version>/<build>/<os>/tool4d_<os or arch>.tar.xz
product-line
: tool4d product line (default defined here, ex: 20.x
)version
: tool4d version (default defined here, ex: 20.3
)build-method
: tool4d build number (default latest
)project
: The project file to run.
*
action will try to find it automaticallystartup-method
The method to run at startup.
user-param
User parameters that could be acceded using 4D code:var $r : Real
var $startupParam: Text
$r:=Get database parameter(User param value; $startupParam)
error-flag
: File used to check if there execution errors (default error
). (see Manage errors)tool4d
: tool4d binary path.A full running example could be found here: https://github.com/e-marchand/tool4d-action-test
.4DProject
file found in Project
On Startup
database method will be launchedname: Unit Tests
on:
...
jobs:
build:
name: "Run on macOS"
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: 4d/tool4d-action@v2
with:
project: "*"
💡 without
project
parameter no tool4d will be launch
Here we choose to launch runUnitTests
method.
name: Unit Tests
on:
...
jobs:
build:
name: "Run on macOS"
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: 4d/tool4d-action@v2
with:
project: "*"
startup-method: runUnitTests
Using matrix, we could factorize. Here a full example
name: Unit Tests
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
pull_request:
branches:
- main
paths-ignore:
- 'README.md'
jobs:
build:
name: "Run on $"
strategy:
fail-fast: false
matrix:
os: [ macos-latest, windows-latest ]
runs-on: $
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: 4d/tool4d-action@v2
id: tool4d
with:
project: $/Project/Build4D_DF.4DProject
startup-method: runUnitTests
Create an error
file in current working directory to notify action of some failures. (4D code do not allow to exit/quit with a specific exit code)
GitHub runner have a lot of tools pre-installed. You could see some description in this repository
On Window you will need in your PATH