version: 43
jobs:
- name: Build for x86_64
  steps:
  - type: CheckoutStep
    name: Checkout
    cloneCredential:
      type: DefaultCredential
    withLfs: true
    withSubmodules: false
    condition: SUCCESSFUL
    optional: false
  - type: CommandStep
    name: Execute build
    runInContainer: true
    image: onedev.site.tesses.net/dependencies/dependencies:latest
    interpreter:
      type: DefaultInterpreter
      commands: |
        mkdir build
        cd build
        cmake -S .. -B . -DTESSESFRAMEWORK_FETCHCONTENT=OFF
        make -j12
        make install DESTDIR=out
    useTTY: true
    condition: SUCCESSFUL
    optional: false
  - type: BuildImageStep
    name: Build Docker Image
    dockerfile: Dockerfile.run
    output:
      type: RegistryOutput
      tags: onedev.site.tesses.net/tesses-framework/tesses-framework:latest onedev.site.tesses.net/tesses-framework/tesses-framework:@commit_hash@ git.tesseslanguage.com/tesses50/tesses-framework:latest git.tesseslanguage.com/tesses50/tesses-framework:@commit_hash@
    registryLogins:
    - registryUrl: '@server_url@'
      userName: '@job_token@'
      passwordSecret: dockersecret
    - registryUrl: git.tesseslanguage.com
      userName: tesses50
      passwordSecret: GITEA_AUTH
    platforms: linux/amd64
    condition: SUCCESSFUL
    optional: false
  triggers:
  - type: BranchUpdateTrigger
    branches: master
    userMatch: anyone
    projects: tesses-framework
  retryCondition: never
  maxRetries: 3
  retryDelay: 30
  timeout: 14400
