Skip to content

Enable pdb for clang #110

Enable pdb for clang

Enable pdb for clang #110

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
#------------------------------------------------------------------------------
code-style-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
- name: Run checks
working-directory: far
run: python tools/source_validator.py
#------------------------------------------------------------------------------
changelog-hlf-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0'
# For "--property UseSharedCompilation=false", see
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow#no-code-found-during-the-build
- name: Build and run ChangelogChecker
working-directory: misc/build-checks/ChangelogChecker
run: dotnet run --project ./ChangelogChecker.csproj --configuration Release --property UseSharedCompilation=false
- name: Build and run HlfChecker
working-directory: misc/build-checks/HlfChecker
run: dotnet run --project ./HlfChecker.csproj --configuration Release --property UseSharedCompilation=false -- Verbose
#------------------------------------------------------------------------------
build-msbuild:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
build: [
msbuild_cl_x64_debug,
msbuild_cl_x64_release,
msbuild_cl_x86_debug,
msbuild_cl_x86_release,
msbuild_cl_ARM64_release,
]
include:
- { build: msbuild_cl_x64_debug, compiler: msbuild_cl, arch: amd64, platform_sln: x64, platform_name: x64, build_config: Debug }
- { build: msbuild_cl_x64_release, compiler: msbuild_cl, arch: amd64, platform_sln: x64, platform_name: x64, build_config: Release }
- { build: msbuild_cl_x86_debug, compiler: msbuild_cl, arch: amd64_x86, platform_sln: Win32, platform_name: x86, build_config: Debug }
- { build: msbuild_cl_x86_release, compiler: msbuild_cl, arch: amd64_x86, platform_sln: Win32, platform_name: x86, build_config: Release }
- { build: msbuild_cl_ARM64_release, compiler: msbuild_cl, arch: amd64_arm64, platform_sln: ARM64, platform_name: ARM64, build_config: Release }
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Initialize CodeQL
if: matrix.build == 'msbuild_cl_x64_debug'
uses: github/codeql-action/init@v2
with:
languages: cpp
- name: Set MSVC envrioment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Set environment for debug build
if: matrix.build_config == 'Debug'
run: Add-Content -Path $env:GITHUB_ENV -Value "DEBUG=1"
- name: Build (cl)
working-directory: _build/vc
run: msbuild -m /property:Configuration=${{ matrix.build_config }} /property:Platform=${{ matrix.platform_sln }} all.sln
- name: Perform CodeQL Analysis
if: matrix.build == 'msbuild_cl_x64_debug'
uses: github/codeql-action/analyze@v2
- name: Publish
uses: actions/upload-artifact@v3
with:
name: Far.${{ matrix.build_config }}.${{ matrix.platform_name }}
path: _build/vc/_output/product/${{ matrix.build_config }}.${{ matrix.platform_sln }}
#------------------------------------------------------------------------------
build-nmake:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
build: [
nmake_cl_x64_debug,
nmake_cl_x64_release,
nmake_cl_x86_debug,
nmake_cl_x86_release,
nmake_cl_ARM64_release,
nmake_clang_x64_debug,
nmake_clang_x64_release,
]
include:
- { build: nmake_cl_x64_debug, compiler: nmake_cl, arch: amd64, build_config: Debug }
- { build: nmake_cl_x64_release, compiler: nmake_cl, arch: amd64, build_config: Release }
- { build: nmake_cl_x86_debug, compiler: nmake_cl, arch: amd64_x86, build_config: Debug }
- { build: nmake_cl_x86_release, compiler: nmake_cl, arch: amd64_x86, build_config: Release }
- { build: nmake_cl_ARM64_release, compiler: nmake_cl, arch: amd64_arm64, build_config: Release }
- { build: nmake_clang_x64_debug, compiler: nmake_clang, arch: amd64, build_config: Debug }
- { build: nmake_clang_x64_release, compiler: nmake_clang, arch: amd64, build_config: Release }
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Initialize CodeQL
if: matrix.build == 'nmake_cl_x64_debug'
uses: github/codeql-action/init@v2
with:
languages: cpp
- name: Set MSVC envrioment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Set environment for debug build
if: matrix.build_config == 'Debug'
run: Add-Content -Path $env:GITHUB_ENV -Value "DEBUG=1"
- name: Build Far (cl)
if: matrix.compiler == 'nmake_cl'
working-directory: far
run: |
cl.exe
nmake /f makefile_vc
- name: Build plugins (cl)
if: matrix.compiler == 'nmake_cl'
working-directory: plugins
run: nmake /f makefile_all_vc
- name: Build Far (clang)
if: matrix.compiler == 'nmake_clang'
working-directory: far
run: |
clang --version
nmake /f makefile_vc CLANG=1
- name: Build plugins (clang)
if: matrix.compiler == 'nmake_clang'
working-directory: plugins
run: nmake /f makefile_all_vc CLANG=1
- name: Perform CodeQL Analysis
if: matrix.build == 'nmake_cl_x64_debug'
uses: github/codeql-action/analyze@v2
#------------------------------------------------------------------------------
build-mingw:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
build: [
mingw_gcc_x64_debug,
mingw_gcc_x64_release,
mingw_clang_x64_debug,
mingw_clang_x64_release,
mingw_llvm_x64_debug,
mingw_llvm_x64_release
]
include:
- { build: mingw_gcc_x64_debug, compiler: mingw_gcc, arch: amd64, build_config: Debug }
- { build: mingw_gcc_x64_release, compiler: mingw_gcc, arch: amd64, build_config: Release }
- { build: mingw_clang_x64_debug, compiler: mingw_clang, arch: amd64, build_config: Debug }
- { build: mingw_clang_x64_release, compiler: mingw_clang, arch: amd64, build_config: Release }
- { build: mingw_llvm_x64_debug, compiler: mingw_llvm, arch: amd64, build_config: Debug }
- { build: mingw_llvm_x64_release, compiler: mingw_llvm, arch: amd64, build_config: Release }
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Initialize CodeQL
if: matrix.build == 'mingw_gcc_x64_debug'
uses: github/codeql-action/init@v2
with:
languages: cpp
- name: Set environment for debug build
if: matrix.build_config == 'Debug'
run: |
Add-Content -Path $env:GITHUB_ENV -Value "DEBUG=1"
Add-Content -Path $env:GITHUB_ENV -Value "USE_LLD=1"
- name: Install GCC x64
if: matrix.compiler == 'mingw_gcc'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: make gcc mingw-w64-x86_64-lld mingw-w64-x86_64-toolchain
- name: Build Far (gcc)
if: matrix.compiler == 'mingw_gcc'
working-directory: far
shell: msys2 {0}
run: |
gcc --version
make -j4 -f makefile_gcc
- name: Build plugins (gcc)
if: matrix.compiler == 'mingw_gcc'
working-directory: plugins
shell: msys2 {0}
run: |
gcc --version
make -j4 -f makefile_all_gcc
- name: Install Clang x64
if: matrix.compiler == 'mingw_clang'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: make mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-toolchain
- name: Build Far (clang)
if: matrix.compiler == 'mingw_clang'
working-directory: far
shell: msys2 {0}
run: |
clang --version
make -j4 CLANG=1 -f makefile_gcc
- name: Build plugins (clang)
if: matrix.compiler == 'mingw_clang'
working-directory: plugins
shell: msys2 {0}
run: |
clang --version
make -j4 CLANG=1 -f makefile_all_gcc
- name: Install llvm x64
id: install_llvm_x64
if: matrix.compiler == 'mingw_llvm'
uses: robinraju/[email protected]
with:
repository: "mstorsjo/llvm-mingw"
latest: true
fileName: "llvm-mingw-*-msvcrt-x86_64.zip"
extract: true
- name: Build Far (llvm)
if: matrix.compiler == 'mingw_llvm'
working-directory: far
shell: cmd
run: |
set path=${{github.workspace}}\llvm-mingw-${{steps.install_llvm_x64.outputs.tag_name}}-msvcrt-x86_64\bin;%path%
clang --version
make -j4 CLANG=1 -f makefile_gcc
- name: Build plugins (llvm)
if: matrix.compiler == 'mingw_llvm'
working-directory: plugins
shell: cmd
run: |
set path=${{github.workspace}}\llvm-mingw-${{steps.install_llvm_x64.outputs.tag_name}}-msvcrt-x86_64\bin;%path%
clang --version
make -j4 CLANG=1 -f makefile_all_gcc
- name: Perform CodeQL Analysis
if: matrix.build == 'mingw_gcc_x64_debug'
uses: github/codeql-action/analyze@v2