<commit_before>name: $(Date:yyyyMMdd)$(Rev:.r)_$(SourceBranchName)

variables:
  nodeVersion: '16.6.2'

trigger:
  branches:
    include:
    - master
    - release/*
    - qt
  tags:
    include:
    - v*

jobs:
  - job: commands_zip
    displayName: "Build commands.zip"
    pool:
      vmImage: 'Ubuntu-18.04'
    steps:
      - script: |
          sudo apt-get update
          sudo apt-get install pkg-config build-essential
          sudo apt-get install cmake make
          sudo apt-get install mesa-common-dev libglu1-mesa-dev
        displayName: "Install development packages"
      - script: rm -rf ~/.cache/nodegui-mini-qt-nodejs || true
      - script: yarn set version berry
      - script: yarn set version 3.x
      - script: yarn plugin import workspace-tools
      - script: yarn install --immutable
        displayName: 'Yarn install'
      - script: node build_scripts/azure_release_version_check.js $(Build.SourceBranch)
        displayName: Check for tag and package.json version
      - script: yarn run package-commands-zip --use-version=$(git describe --tags)
        displayName: 'Run yarn package-commands-zip'
      - task: CopyFiles@2
        inputs:
          sourceFolder: '$(Build.SourcesDirectory)/build_tmp'
          contents: '*.zip'
          targetFolder: '$(Build.ArtifactStagingDirectory)'
      - task: PublishPipelineArtifact@0
        inputs:
          artifactName: 'commands build output'
          targetPath: '$(Build.ArtifactStagingDirectory)'

  - job: package_linux
    displayName: "Build Linux packages"
    pool:
      vmImage: 'Ubuntu-18.04'
    steps:
      - script: |
          sudo apt-get update
          sudo apt-get install pkg-config build-essential
          sudo apt-get install cmake make
          sudo apt-get install xserver-xorg-core mesa-common-dev libglu1-mesa-dev libxkbcommon-x11-0
        displayName: "Install development packages"
      - script: rm -rf ~/.cache/nodegui-mini-qt-nodejs || true
      - task: NodeTool@0
        inputs:
          versionSpec: $(nodeVersion)
      - script: yarn set version berry
      - script: yarn set version 3.x
      - script: yarn plugin import workspace-tools
      - script: yarn --version
        displayName: "yarn --version"
      - script: yarn install --immutable
        displayName: "yarn install"
      - script: node build_scripts/azure_release_version_check.js $(Build.SourceBranch)
        displayName: Check for tag and package.json version
      - script: "yarn run download-launcher-executable"
        displayName: "Download the launcher executable"
      - script: "yarn run download-deploy-tool"
        displayName: "Download the deploy packaging tool"
      - script: yarn run lint-strict
        displayName: "yarn run lint-strict"
      - script: yarn run build
        displayName: "yarn run build"
      - script: yarn run test
        displayName: "yarn run test"
      - script: yarn run package-linux --version=$(git describe --tags)
        displayName: "yarn run package-linux"
      - script: cp $(Build.SourcesDirectory)/build_tmp/*.zip $(Build.ArtifactStagingDirectory)
      - script: cp $(Build.SourcesDirectory)/build_tmp/*.deb $(Build.ArtifactStagingDirectory)
      - task: PublishPipelineArtifact@0
        inputs:
          artifactName: 'Linux build output'
          targetPath: '$(Build.ArtifactStagingDirectory)'

  - job: package_windows
    displayName: "Build Windows packages"
    pool:
      vmImage: 'windows-latest'
    steps:
      - script: choco install nsis -y
        displayName: "install nsis"
      - script: choco install zip -y
        displayName: "install zip"
      - task: NodeTool@0
        inputs:
          versionSpec: $(nodeVersion)
      - script: yarn set version berry
      - script: yarn set version 3.x
      - script: yarn plugin import workspace-tools
      - script: yarn install --immutable
        displayName: "yarn install"
      - script: node build_scripts/azure_release_version_check.js $(Build.SourceBranch)
        displayName: Check for tag and package.json version
      - script: "yarn run download-launcher-executable"
        displayName: "Download the launcher executable"
      - script: "yarn run download-deploy-tool"
        displayName: "Download the deploy packaging tool"
      - script: yarn run lint-strict
        displayName: "yarn run lint-strict"
      - script: yarn run build
        displayName: "yarn run build"
      - script: yarn run test
        displayName: "yarn run test"
      - script: |
          PATH=C:\Program Files (x86)\NSIS\;%PATH%
          git describe --tags > APP_VERSION.txt
          set /p APP_VERSION= < APP_VERSION.txt
          del APP_VERSION.txt
          yarn run package-windows --version=%APP_VERSION%
        displayName: "yarn run package-windows"
      - task: CopyFiles@2
        inputs:
          sourceFolder: '$(Build.SourcesDirectory)/build_tmp'
          contents: '*.zip'
          targetFolder: '$(Build.ArtifactStagingDirectory)'
      - task: CopyFiles@2
        inputs:
          sourceFolder: '$(Build.SourcesDirectory)/build_tmp'
          contents: '*.exe'
          targetFolder: '$(Build.ArtifactStagingDirectory)'
      - task: PublishPipelineArtifact@0
        inputs:
          artifactName: 'Windows build output'
          targetPath: '$(Build.ArtifactStagingDirectory)'

  - job: package_macos
    displayName: "Build macOS packages"
    pool:
      vmImage: 'macOS-1015'
    steps:
      - task: NodeTool@0
        inputs:
          versionSpec: $(nodeVersion)
      - script: yarn set version berry
      - script: yarn set version 3.x
      - script: yarn plugin import workspace-tools
      - script: yarn install --immutable
        displayName: "yarn install"
      - script: node build_scripts/azure_release_version_check.js $(Build.SourceBranch)
        displayName: Check for tag and package.json version
      - script: "yarn run download-launcher-executable"
        displayName: "Download the launcher executable"
      - script: "yarn run download-deploy-tool"
        displayName: "Download the deploy packaging tool"
      - script: yarn run lint-strict
        displayName: "yarn run lint-strict"
      - script: yarn run build
        displayName: "yarn run build"
      - script: yarn run test<commit_msg>Fix up "yarn install" command on CI<commit_after>name: $(Date:yyyyMMdd)$(Rev:.r)_$(SourceBranchName)

variables:
  nodeVersion: '16.6.2'

trigger:
  branches:
    include:
    - master
    - release/*
    - qt
  tags:
    include:
    - v*

jobs:
  - job: commands_zip
    displayName: "Build commands.zip"
    pool:
      vmImage: 'Ubuntu-18.04'
    steps:
      - script: |
          sudo apt-get update
          sudo apt-get install pkg-config build-essential
          sudo apt-get install cmake make
          sudo apt-get install mesa-common-dev libglu1-mesa-dev
        displayName: "Install development packages"
      - script: rm -rf ~/.cache/nodegui-mini-qt-nodejs || true
      - script: yarn set version berry
      - script: yarn set version 3.x
      - script: yarn plugin import workspace-tools
      - script: yarn install
        displayName: 'Yarn install'
      - script: node build_scripts/azure_release_version_check.js $(Build.SourceBranch)
        displayName: Check for tag and package.json version
      - script: yarn run package-commands-zip --use-version=$(git describe --tags)
        displayName: 'Run yarn package-commands-zip'
      - task: CopyFiles@2
        inputs:
          sourceFolder: '$(Build.SourcesDirectory)/build_tmp'
          contents: '*.zip'
          targetFolder: '$(Build.ArtifactStagingDirectory)'
      - task: PublishPipelineArtifact@0
        inputs:
          artifactName: 'commands build output'
          targetPath: '$(Build.ArtifactStagingDirectory)'

  - job: package_linux
    displayName: "Build Linux packages"
    pool:
      vmImage: 'Ubuntu-18.04'
    steps:
      - script: |
          sudo apt-get update
          sudo apt-get install pkg-config build-essential
          sudo apt-get install cmake make
          sudo apt-get install xserver-xorg-core mesa-common-dev libglu1-mesa-dev libxkbcommon-x11-0
        displayName: "Install development packages"
      - script: rm -rf ~/.cache/nodegui-mini-qt-nodejs || true
      - task: NodeTool@0
        inputs:
          versionSpec: $(nodeVersion)
      - script: yarn set version berry
      - script: yarn set version 3.x
      - script: yarn plugin import workspace-tools
      - script: yarn --version
        displayName: "yarn --version"
      - script: yarn install
        displayName: "yarn install"
      - script: node build_scripts/azure_release_version_check.js $(Build.SourceBranch)
        displayName: Check for tag and package.json version
      - script: "yarn run download-launcher-executable"
        displayName: "Download the launcher executable"
      - script: "yarn run download-deploy-tool"
        displayName: "Download the deploy packaging tool"
      - script: yarn run lint-strict
        displayName: "yarn run lint-strict"
      - script: yarn run build
        displayName: "yarn run build"
      - script: yarn run test
        displayName: "yarn run test"
      - script: yarn run package-linux --version=$(git describe --tags)
        displayName: "yarn run package-linux"
      - script: cp $(Build.SourcesDirectory)/build_tmp/*.zip $(Build.ArtifactStagingDirectory)
      - script: cp $(Build.SourcesDirectory)/build_tmp/*.deb $(Build.ArtifactStagingDirectory)
      - task: PublishPipelineArtifact@0
        inputs:
          artifactName: 'Linux build output'
          targetPath: '$(Build.ArtifactStagingDirectory)'

  - job: package_windows
    displayName: "Build Windows packages"
    pool:
      vmImage: 'windows-latest'
    steps:
      - script: choco install nsis -y
        displayName: "install nsis"
      - script: choco install zip -y
        displayName: "install zip"
      - task: NodeTool@0
        inputs:
          versionSpec: $(nodeVersion)
      - script: yarn set version berry
      - script: yarn set version 3.x
      - script: yarn plugin import workspace-tools
      - script: yarn install
        displayName: "yarn install"
      - script: node build_scripts/azure_release_version_check.js $(Build.SourceBranch)
        displayName: Check for tag and package.json version
      - script: "yarn run download-launcher-executable"
        displayName: "Download the launcher executable"
      - script: "yarn run download-deploy-tool"
        displayName: "Download the deploy packaging tool"
      - script: yarn run lint-strict
        displayName: "yarn run lint-strict"
      - script: yarn run build
        displayName: "yarn run build"
      - script: yarn run test
        displayName: "yarn run test"
      - script: |
          PATH=C:\Program Files (x86)\NSIS\;%PATH%
          git describe --tags > APP_VERSION.txt
          set /p APP_VERSION= < APP_VERSION.txt
          del APP_VERSION.txt
          yarn run package-windows --version=%APP_VERSION%
        displayName: "yarn run package-windows"
      - task: CopyFiles@2
        inputs:
          sourceFolder: '$(Build.SourcesDirectory)/build_tmp'
          contents: '*.zip'
          targetFolder: '$(Build.ArtifactStagingDirectory)'
      - task: CopyFiles@2
        inputs:
          sourceFolder: '$(Build.SourcesDirectory)/build_tmp'
          contents: '*.exe'
          targetFolder: '$(Build.ArtifactStagingDirectory)'
      - task: PublishPipelineArtifact@0
        inputs:
          artifactName: 'Windows build output'
          targetPath: '$(Build.ArtifactStagingDirectory)'

  - job: package_macos
    displayName: "Build macOS packages"
    pool:
      vmImage: 'macOS-1015'
    steps:
      - task: NodeTool@0
        inputs:
          versionSpec: $(nodeVersion)
      - script: yarn set version berry
      - script: yarn set version 3.x
      - script: yarn plugin import workspace-tools
      - script: yarn install
        displayName: "yarn install"
      - script: node build_scripts/azure_release_version_check.js $(Build.SourceBranch)
        displayName: Check for tag and package.json version
      - script: "yarn run download-launcher-executable"
        displayName: "Download the launcher executable"
      - script: "yarn run download-deploy-tool"
        displayName: "Download the deploy packaging tool"
      - script: yarn run lint-strict
        displayName: "yarn run lint-strict"
      - script: yarn run build
        displayName: "yarn run build"
      - script: yarn run test
{'fraction_non_alphanumeric': 0.094216714331109, 'fraction_numerical': 0.005719733079122974, 'mean_word_length': 2.3561716875499865, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '189838', 'n_tokens_mistral': 3685, 'n_tokens_neox': 3527, 'n_words': 1025}