1+ name : Build
2+
3+ on :
4+ push :
5+ branches : [master]
6+ tags :
7+ - ' *'
8+ pull_request :
9+ branches : [master]
10+
11+ jobs :
12+ windows :
13+ runs-on : windows-latest
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Build
17+ run : |
18+ cmake -B ${{github.workspace}}/build -A x64
19+ cmake --build ${{github.workspace}}/build --config Release
20+ - name : Upload windows build
21+ uses : actions/upload-artifact@v2
22+ with :
23+ name : windows
24+ path : ${{github.workspace}}/build/Analyzers/Release/*.dll
25+ macos :
26+ runs-on : macos-latest
27+ steps :
28+ - uses : actions/checkout@v2
29+ - name : Build
30+ run : |
31+ cmake -B ${{github.workspace}}/build/x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=x86_64
32+ cmake --build ${{github.workspace}}/build/x86_64
33+ cmake -B ${{github.workspace}}/build/arm64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64
34+ cmake --build ${{github.workspace}}/build/arm64
35+ - name : Upload MacOS x86_64 build
36+ uses : actions/upload-artifact@v2
37+ with :
38+ name : macos_x86_64
39+ path : ${{github.workspace}}/build/x86_64/Analyzers/*.so
40+ - name : Upload MacOS arm64 build
41+ uses : actions/upload-artifact@v2
42+ with :
43+ name : macos_arm64
44+ path : ${{github.workspace}}/build/arm64/Analyzers/*.so
45+ linux :
46+ runs-on : ubuntu-latest
47+ steps :
48+ - uses : actions/checkout@v2
49+ - name : Build
50+ run : |
51+ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
52+ cmake --build ${{github.workspace}}/build
53+ env :
54+ CC : gcc-10
55+ CXX : g++-10
56+ - name : Upload Linux build
57+ uses : actions/upload-artifact@v2
58+ with :
59+ name : linux
60+ path : ${{github.workspace}}/build/Analyzers/*.so
61+ publish :
62+ needs : [windows, macos, linux]
63+ runs-on : ubuntu-latest
64+ steps :
65+ - name : download individual builds
66+ uses : actions/download-artifact@v2
67+ with :
68+ path : ${{github.workspace}}/artifacts
69+ - name : zip
70+ run : |
71+ cd ${{github.workspace}}/artifacts
72+ zip -r ${{github.workspace}}/analyzer.zip .
73+ - uses : actions/upload-artifact@v2
74+ with :
75+ name : all-platforms
76+ path : ${{github.workspace}}/artifacts/**
77+ - name : create release
78+ uses : softprops/action-gh-release@v1
79+ if : startsWith(github.ref, 'refs/tags/')
80+ with :
81+ files : ${{github.workspace}}/analyzer.zip
0 commit comments