@@ -23,79 +23,114 @@ jobs:
23
23
fail-fast : false
24
24
matrix :
25
25
include :
26
+ - { name: "MSVC 14.3 - C++20", os: windows-2022, cxxstd: '20', cmake_args: -G "Visual Studio 17 2022" -A x64, github_release: true }
26
27
- { name: "GCC 12 - C++20", os: ubuntu-22.04, cc: gcc-12, cxx: g++-12, cxxstd: '20', install: g++-12, github_release: true }
27
28
- { name: "GCC 11 - C++20", os: ubuntu-22.04, cc: gcc-11, cxx: g++-11, cxxstd: 20, install: g++-11 }
29
+ - { name: "Clang 15 - C++20", os: ubuntu-22.04, cc: clang-15, cxx: clang++-15, cxxstd: 20, install: "clang-15 libxml2-utils" }
28
30
29
31
# no <source_location>
30
32
# - { name: "GCC 10 - C++20", os: ubuntu-22.04, cc: gcc-10, cxx: g++-10, cxxstd: 20, install: g++-10 }
31
33
# - { name: "GCC 9 - C++20", os: ubuntu-22.04, cc: gcc-9, cxx: g++-9, cxxstd: 20, install: g++-9 }
32
34
33
- - { name: "Clang 15 - C++20", os: ubuntu-22.04, cc: clang-15, cxx: clang++-15, cxxstd: 20, install: "clang-15 libxml2-utils" }
34
-
35
35
# no <source_location>
36
36
# - { name: "Clang 14 - C++20", os: ubuntu-22.04, cc: clang-14, cxx: clang++-14, cxxstd: 20, install: clang-14 }
37
37
# - { name: "Clang 13 - C++20", os: ubuntu-22.04, cc: clang-13, cxx: clang++-13, cxxstd: 20, install: clang-13 }
38
38
# - { name: "Clang 12 - C++20", os: ubuntu-22.04, cc: clang-12, cxx: clang++-12, cxxstd: 20, install: clang-12 }
39
39
40
- # There's no LLVM container for MSVC yet
41
- # - { name: "MSVC 14.3 - C++20", os: windows-2022, cxxstd: '17,20', cmake_args: -G "Visual Studio 17 2022" -A x64, }
42
40
43
41
name : ${{ matrix.name }}
44
42
runs-on : ${{ matrix.os }}
45
- container :
46
- image : cppalliance/droneubuntu2204:llvm-731264b
43
+ container : ${{ !startsWith( matrix.os , 'windows' ) && 'cppalliance/droneubuntu2204:llvm-731264b' || null }}
47
44
permissions :
48
45
contents : write
49
46
50
47
steps :
51
48
- uses : actions/checkout@v3
52
49
53
- # - name: Environment
54
- # run: |
55
- # for dir in /usr/include/llvm /usr/local/include/llvm /usr/local/clang+llvm/include/llvm /usr/include/clang /usr/local/include/clang /usr/local/clang+llvm/include/clang
56
- # do
57
- # if [ -d "$dir" ]; then
58
- # find "$dir" -type f -name "*.h" -print
59
- # else
60
- # echo "$dir directory does not exist."
61
- # fi
62
- # done
50
+ - name : Install LLVM
51
+ id : llvm-install
52
+ if : ${{ startsWith( matrix.os , 'windows' ) }}
53
+ shell : bash
54
+ run : |
55
+ export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}
56
+ export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}
57
+ export AWS_DEFAULT_REGION=${{ secrets.AWS_REGION }}
58
+ aws s3 cp s3://${{ secrets.AWS_BUCKET_NAME }}/llvm-install/RelWithDebInfo-731264b0.7z RelWithDebInfo-731264b0.7z
59
+ 7z x RelWithDebInfo-731264b0.7z -ollvm-install
60
+ llvm_dir="./llvm-install/RelWithDebInfo"
61
+ llvm_dir="$(readlink -f "$llvm_dir" 2>/dev/null || realpath -e "$llvm_dir" 2>/dev/null || echo "$(pwd)/$llvm_dir")"
62
+ echo "llvm-dir=$llvm_dir" >> $GITHUB_OUTPUT
63
+ substring="C:/Program Files/Microsoft Visual Studio/2022/Community/DIA SDK/lib/amd64/diaguids.lib;"
64
+ sed -i "s|$substring||g" "./llvm-install/RelWithDebInfo/lib/cmake/llvm/LLVMExports.cmake"
63
65
64
66
- name : Install packages
65
67
if : ${{ matrix.install }}
66
68
uses : ./.github/actions/package_install
67
69
id : package-install
68
70
with :
69
- # vcpkg: fmt,openssl,zlib
70
71
apt-get : ${{ matrix.install }}
71
72
72
- # - name: Boost Clone
73
- # uses: ./.github/actions/boost_clone
74
- # with:
75
- # boost_dir: boost
76
- # branch: ${{ (startsWith(github.ref, 'refs/heads/master') && 'master') || 'develop' }}
77
- # patches: https://github.com/CppAlliance/buffers.git,https://github.com/CppAlliance/http_proto.git,https://github.com/CppAlliance/http_io.git
78
- # modules: url,../../../BoostServerTech
79
-
80
73
- name : CMake Workflow (C++${{ matrix.cxxstd }})
81
- uses : alandefreitas/cpp-actions/cmake_workflow @master
74
+ uses : alandefreitas/cpp-actions/cmake-workflow @master
82
75
with :
83
76
cxxstd : ${{ matrix.cxxstd }}
84
77
cxx : ${{ matrix.cxx }}
85
78
cc : ${{ matrix.cc }}
86
79
install-prefix : .local
87
- extra-args : ${{ format('-D LLVM_ROOT={0} -D Clang_ROOT={0} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '/usr/local') }}
88
- # toolchain: ${{ steps.package-install.outputs.vcpkg_toolchain }}
80
+ extra-args : ${{ format('-D LLVM_ROOT={0} -D Clang_ROOT={0} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON', (startsWith( matrix.os , 'windows') && steps.llvm-install.outputs.llvm-dir) || '/usr/local') }}
89
81
90
82
- name : Create packages
91
83
working-directory : ./build
92
84
run : cpack
93
85
94
- - name : Create GitHub Package Release
86
+ - name : Upload GitHub Release Artifacts
95
87
if : ${{ matrix.github_release && github.event_name == 'push' && (contains(fromJSON('["master", "develop"]'), github.ref_name) || startsWith(github.ref, 'refs/tags/')) }}
88
+ uses : actions/upload-artifact@v3
89
+ with :
90
+ name : release-packages-${{ runner.os }}
91
+ path : build/MrDox-?.?.?-*.*
92
+ retention-days : 1
93
+
94
+ docs :
95
+ needs : build
96
+ if : ${{ github.event_name == 'push' && (contains(fromJSON('["master", "develop"]'), github.ref_name) || startsWith(github.ref, 'refs/tags/')) }}
97
+ defaults :
98
+ run :
99
+ shell : bash
100
+
101
+ strategy :
102
+ fail-fast : false
103
+ matrix :
104
+ include :
105
+ - { name: 'Create Release Packages', os: ubuntu-22.04 }
106
+
107
+ name : ${{ matrix.name }}
108
+ timeout-minutes : 120
109
+ runs-on : ${{matrix.os}}
110
+ permissions :
111
+ contents : write
112
+
113
+ steps :
114
+ - uses : actions/download-artifact@v3
115
+ with :
116
+ name : release-packages-Linux
117
+ path : build
118
+
119
+ - uses : actions/download-artifact@v3
120
+ with :
121
+ name : release-packages-Windows
122
+ path : build
123
+
124
+ - name : List artifacts
125
+ run : ls -R
126
+ working-directory : build
127
+
128
+ - name : Create GitHub Package Release
129
+ if : ${{ github.event_name == 'push' && (contains(fromJSON('["master", "develop"]'), github.ref_name) || startsWith(github.ref, 'refs/tags/')) }}
96
130
uses : softprops/action-gh-release@v1
97
131
with :
98
132
files : build/MrDox-?.?.?-*.*
99
- tag_name : ${{ github.ref_name || github.ref }}
133
+ name : ${{ github.ref_name || github.ref }}
134
+ tag_name : ${{ github.ref_name || github.ref }}${{ (!startsWith(github.ref, 'refs/tags/')) && '-release' }}
100
135
token : ${{ github.token }}
101
136
0 commit comments