4d / build4d-action

MIT License
0 stars 0 forks source link

build4d-action

build buildprj

Take your 4D project and compile it.

Convert compilation errors as github annotations.

Usage

Create workflow file inside your repository inside .github/workflows/, for instance name build.yml, and put inside the following content

name: Build
on:
  push:
    paths:
      - '**.4dm'
  pull_request:
    paths:
      - '**.4dm'
  workflow_dispatch:

jobs:
  build:
    name: "Build"
    runs-on: windows-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Build
      uses: 4d/build4d-action@main

At each 4dm modification the build check syntax will be launched. See "Actions" tabs of your project.

to build on macOS and window

use matrix

name: build
on:
 push:
    paths:
      - '**.4dm'
  pull_request:
    paths:
      - '**.4dm'
  workflow_dispatch:

jobs:
  build:
    name: "Build on ${{ matrix.os }}"
    strategy:
      fail-fast: false
      matrix:
        os: [ macos-latest, windows-latest ]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Build
      uses: 4d/build4d-action@main

action options

project

You could pass the path of the project to compile it, if the project is not inside the Project folder.

choosing 4d version

The options are the same found tool4d-action project

compilations options

See documentation of Compiler projet 4d command for more information

reporting options

more options

You could do more than build. For instance you could pack(create 4DZ), and archive result (into zip)

sign options

To sign add the action

then you must specify the certificate name that you install in a previous step (using Github secret for instance)

    - name: Build
      uses: 4d/build4d-action@main
      with:
        actions: "build,pack,sign,archive"
        sign-certificate: "Developer ID"

Others