-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (38 loc) · 1.48 KB
/
build-win64.yml
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
name: build-win64
permissions:
contents: write
on: [push, pull_request]
jobs:
build:
# Skip building pull requests from the same repository.
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
runs-on: windows-2022
steps:
- name: Setup llvm-msvc
uses: backengineering/setup-llvm-msvc@v5
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
cmake -Bbuild -TLLVM-MSVC_v143 -DCMAKE_WIN64_DRIVER=1 -DENABLE_TEST=1
cmake --build build --config Release
- uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ github.sha }}
path: |
build/Release
- name: Compress artifacts
uses: vimtor/action-zip@26a249fb00d43ca98dad77a4b3838025fc226aa1 # v1.1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
files: |
build/Release/*.*
dest: ${{ github.event.repository.name }}-${{ github.sha }}.zip
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') || contains(github.ref, '-pre') }}
files: ${{ github.event.repository.name }}-${{ github.sha }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}