@@ -22,17 +22,17 @@ jobs:
22
22
#
23
23
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
24
24
matrix :
25
- os : [ubuntu-latest , windows-latest, macos-latest]
25
+ os : [' ubuntu-22.04' , windows-latest, macos-latest]
26
26
build_type : [Release]
27
27
c_compiler : [gcc, clang, cl]
28
28
include :
29
29
- os : windows-latest
30
30
c_compiler : cl
31
31
cpp_compiler : cl
32
- - os : ubuntu-latest
32
+ - os : ' ubuntu-22.04 '
33
33
c_compiler : gcc
34
34
cpp_compiler : g++
35
- - os : ubuntu-latest
35
+ - os : ' ubuntu-22.04 '
36
36
c_compiler : clang
37
37
cpp_compiler : clang++
38
38
- os : macos-latest
43
43
c_compiler : gcc
44
44
- os : windows-latest
45
45
c_compiler : clang
46
- - os : ubuntu-latest
46
+ - os : ' ubuntu-22.04 '
47
47
c_compiler : cl
48
48
- os : macos-latest
49
49
c_compiler : gcc
61
61
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
62
62
63
63
- name : Install dependencies (Ubuntu)
64
- if : ${{ matrix.os == 'ubuntu-latest ' }}
64
+ if : ${{ matrix.os == 'ubuntu-22.04 ' }}
65
65
run : |
66
66
sudo apt-get update
67
67
sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libwayland-dev libxkbcommon-dev libgl1-mesa-dev
88
88
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
89
89
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
90
90
run : ctest --build-config ${{ matrix.build_type }}
91
+
92
+ - name : Copy Shared Libraries
93
+ shell : bash
94
+ run : |
95
+ if [ "$RUNNER_OS" == "Linux" ]; then
96
+ cp -L $VULKAN_SDK/lib/libvulkan* ${{ steps.strings.outputs.build-output-dir }}/bin/
97
+
98
+ cp -L /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ${{ steps.strings.outputs.build-output-dir }}/bin/
99
+ cp -L /lib/x86_64-linux-gnu/libgcc_s.so.1 ${{ steps.strings.outputs.build-output-dir }}/bin/
100
+
101
+ elif [ "$RUNNER_OS" == "macOS" ]; then
102
+ cp $VULKAN_SDK/lib/libMoltenVK.dylib ${{ steps.strings.outputs.build-output-dir }}/bin/
103
+ cp $VULKAN_SDK/lib/libvulkan.* ${{ steps.strings.outputs.build-output-dir }}/bin/
104
+ fi
105
+
106
+ - name : Upload Artifacts
107
+ uses : actions/upload-artifact@v4
108
+ with :
109
+ name : ${{ matrix.os }}-${{ matrix.c_compiler }}-binaries
110
+ path : |
111
+ ${{ steps.strings.outputs.build-output-dir }}/bin
112
+ retention-days : 5
113
+
114
+ release :
115
+ needs : build
116
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
117
+ runs-on : ubuntu-latest
118
+ permissions :
119
+ contents : write
120
+ steps :
121
+ - uses : actions/checkout@v4
122
+
123
+ - name : Get version from CMakeLists.txt
124
+ id : get_version
125
+ run : |
126
+ VERSION=$(grep -oP 'project\([^)]*VERSION\s+\K[0-9.]+' CMakeLists.txt || echo "0.1.0")
127
+ COMMIT_SHA="${{ github.sha }}"
128
+ SHORT_SHA="${COMMIT_SHA:0:7}"
129
+ echo "version=$VERSION-$SHORT_SHA" >> $GITHUB_OUTPUT
130
+ echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
131
+
132
+ - name : Download all artifacts
133
+ uses : actions/download-artifact@v4
134
+ with :
135
+ path : artifacts
136
+
137
+ - name : List downloaded artifacts
138
+ run : find artifacts -type f | sort
139
+
140
+ - name : Create Release
141
+ id : create_release
142
+
143
+ env :
144
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
145
+ with :
146
+ name : Release ${{ steps.get_version.outputs.version }} (${{ steps.get_version.outputs.date }})
147
+ tag_name : v${{ steps.get_version.outputs.version }}
148
+ draft : false
149
+ prerelease : false
150
+ generate_release_notes : true
151
+ files : |
152
+ artifacts/**/*.zip
153
+ artifacts/**/*.tar.gz
0 commit comments