Skip to content

feat: add syntax parser and preprocessor info to acts lsp #895

feat: add syntax parser and preprocessor info to acts lsp

feat: add syntax parser and preprocessor info to acts lsp #895

Workflow file for this run

name: Build
on:
push:
paths:
- "src/**"
- "premake5.lua"
- ".github/workflows/build.yml"
pull_request:
paths:
- "src/**"
workflow_dispatch:
inputs:
release:
description: "Release after build"
required: true
type: boolean
jobs:
build:
name: Atian Tools Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v3.5.3
with:
submodules: true
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
- name: Get version
id: get_version
shell: pwsh
run: "\"version=$(scripts/getversion.ps1)\" | Out-File $env:GITHUB_OUTPUT"
- name: Version
run: "\"version: ${{ steps.get_version.outputs.version }}\""
- name: Install LLVM Clang
uses: KyleMayes/install-llvm-action@v2.0.9
with:
version: "22.1.7"
force-url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.7/LLVM-22.1.7-win64.exe"
- name: Install Qt
uses: jurplel/install-qt-action@v4
# only install qt in shared context
with:
version: "6.11.0"
host: "windows"
target: "desktop"
arch: "win64_msvc2022_64"
cache: true
use-official: true
email: ${{ secrets.QT_EMAIL }}
pw: ${{ secrets.QT_PASSWORD }}
# Install Khronos OpenCL SDK (headers + .lib only, no OpenCL.dll)
- name: Install OpenCL SDK
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://github.com/KhronosGroup/OpenCL-SDK/releases/download/v2025.07.23/OpenCL-SDK-v2025.07.23-Win-x64.zip" -OutFile "OpenCL-SDK.zip"
Expand-Archive OpenCL-SDK.zip -DestinationPath OpenCL-SDK
Write-Host "OpenCL_ROOT=$env:GITHUB_WORKSPACE/OpenCL-SDK/OpenCL-SDK-v2025.07.23-Win-x64"
Write-Host "OpenCL_INCLUDE_DIR=$env:GITHUB_WORKSPACE/OpenCL-SDK/OpenCL-SDK-v2025.07.23-Win-x64/include"
Write-Host "OpenCL_LIBRARY=$env:GITHUB_WORKSPACE/OpenCL-SDK/OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCL.lib"
Add-Content -Path $env:GITHUB_ENV -Value "OpenCL_ROOT=$env:GITHUB_WORKSPACE/OpenCL-SDK/OpenCL-SDK-v2025.07.23-Win-x64"
Add-Content -Path $env:GITHUB_ENV -Value "OpenCL_INCLUDE_DIR=$env:GITHUB_WORKSPACE/OpenCL-SDK/OpenCL-SDK-v2025.07.23-Win-x64/include"
Add-Content -Path $env:GITHUB_ENV -Value "OpenCL_LIBRARY=$env:GITHUB_WORKSPACE/OpenCL-SDK/OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCL.lib"
- name: Create project
shell: pwsh
run: |
. "$env:LLVM_PATH/bin/clang-format.exe" --version
scripts/setupdater.ps1 -versionEndpoint "https://github.com/${{ github.repository }}/releases/latest/download/version" -zipEndpoint "https://github.com/${{ github.repository }}/releases/latest/download/acts.zip" -projectUrl "https://github.com/${{ github.repository }}" -project "${{ github.repository }}"
scripts/setup.ps1 -ci -clangFormatPath "$env:LLVM_PATH/bin/clang-format.exe"
- name: Validate project format
run: cmake --build build --target check-format
- name: Build project
shell: pwsh
run: msbuild build/AtianCodTools.slnx /p:Configuration=Release /p:Platform=x64
- name: Run tests
run: build/bin/Release/acts.exe --noUpdater -l p -d -t utest
- name: Package project
shell: pwsh
run: scripts/package.ps1 -deployQt
- name: Upload dev release
if: github.ref == 'refs/heads/main'
uses: ncipollo/release-action@v1
with:
commit: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: "latest_build"
artifacts: "build/package/acts.zip,build/package/acts-dev.zip,build/package/acts/bin/acts-shield-plugin.dll,build/package/acts/bin/version"
artifactErrorsFailBuild: true
makeLatest: false
removeArtifacts: true
replacesArtifacts: true
allowUpdates: true
name: "Dev build ${{ steps.get_version.outputs.version }}"
body: "Latest dev build, [get the latest release build here](https://github.com/${{ github.repository }}/releases/latest)."
- name: Upload release
if: inputs.release && github.ref == 'refs/heads/main'
uses: ncipollo/release-action@v1
with:
commit: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "build/package/acts.zip,build/package/acts-dev.zip,build/package/acts/bin/acts-shield-plugin.dll,build/package/acts/bin/version"
artifactErrorsFailBuild: true
makeLatest: true
tag: "${{ steps.get_version.outputs.version }}"
name: "${{ steps.get_version.outputs.version }}"
bodyFile: release/RELEASE.MD