-
Notifications
You must be signed in to change notification settings - Fork 140
61 lines (48 loc) · 1.93 KB
/
os_windows.yaml
File metadata and controls
61 lines (48 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Windows Build with open source compilers
on: [push, pull_request]
jobs:
Windows:
runs-on: windows-latest
strategy:
matrix:
compiler: [clang-cl]
build_type: [Release, Debug]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: "Clang-cl: Define compiler version"
if: matrix.compiler == 'clang-cl'
run: |
$env:COMPILER_VERSION = "21"
Add-Content -Path $env:GITHUB_ENV -Value "COMPILER_VERSION=$env:COMPILER_VERSION"
- name: "Define package name"
run: |
$env:VERSION = if ($env:GITHUB_REF -and $env:GITHUB_REF -match "^refs/tags/(?<tag>.+)$") { $matches["tag"] } else { "dev" }
$env:PACKAGE_VERSION = "$env:VERSION-${{ matrix.compiler }}-$env:COMPILER_VERSION-x64-${{ matrix.build_type }}"
Add-Content -Path $env:GITHUB_ENV -Value "PACKAGE_VERSION=$env:PACKAGE_VERSION"
- name: "Clang-cl: Set up LLVM"
if: matrix.compiler == 'clang-cl'
uses: KyleMayes/install-llvm-action@98e68e10c96dffcb7bfed8b2144541a66b49aa02 # v2.0.8
with:
version: ${{ env.COMPILER_VERSION }}
- name: Install Ninja
run: choco install ninja
- name: Output environment information
run: |
cmake --version
ninja --version
${{ matrix.compiler }} --version
- name: "Configure CMake"
if: matrix.compiler == 'clang-cl'
run: |
cmake -S . -B build -G "Ninja" -DCMAKE_C_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCPACK_PACKAGE_VERSION="$env:PACKAGE_VERSION" -DUSE_STATIC_RUNTIME=ON
- name: Build with CMake
run: cmake --build build --config "${{ matrix.build_type }}"
- name: Create package
run: cmake --build build --target package
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: ${{ env.PACKAGE_VERSION }}
path: build/win_flex_bison*.zip