Skip to content

Commit 618f379

Browse files
authored
CI: Update CI build files (#596)
- Update CMake macros for Apple Silicon brew locations - Update Discord notifier runner to use Ubuntu latest - Change Windows Boost install to use Chocolaty
1 parent 91b8a78 commit 618f379

File tree

5 files changed

+24
-72
lines changed

5 files changed

+24
-72
lines changed

.github/workflows/macos.yml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ env:
77
BUILD_TYPE: Release
88
REPO_DIR : ${{github.workspace}}
99
BUILD_DIR: ${{github.workspace}}/bin/builddir
10-
BOOST_VERSION: "1.83.0"
11-
BOOST_PLATFORM_VERSION: "13"
1210

1311
permissions:
1412
contents: read
1513

1614
jobs:
1715
build:
18-
runs-on: macos-13
16+
runs-on: macos-14
1917
permissions:
2018
contents: read
2119

@@ -27,29 +25,15 @@ jobs:
2725

2826
- name: Install Dependencies
2927
run: |
30-
brew install mysql-client
28+
brew install mysql-client@8.4
3129
brew install openssl
30+
brew install boost
3231
echo "OPENSSL_ROOT_DIR=$(brew --prefix --installed openssl)" >> $GITHUB_ENV
3332
34-
- name: Install Boost
35-
uses: MarkusJx/install-boost@v2.5.0
36-
id: install-boost
37-
with:
38-
# REQUIRED: Specify the required boost version
39-
# A list of supported versions can be found here:
40-
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
41-
boost_version: ${{env.BOOST_VERSION}}
42-
# OPTIONAL: Specify a platform version
43-
platform_version: ${{env.BOOST_PLATFORM_VERSION}}
44-
# OPTIONAL: Specify a toolset
45-
toolset: clang
46-
# NOTE: If a boost version matching all requirements cannot be found,
47-
# this build step will fail
48-
4933
- name: Configure
5034
env:
51-
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
52-
run: cmake -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}} -DBoost_ARCHITECTURE=-x64
35+
BOOST_ROOT: /opt/homebrew/opt/boost
36+
run: cmake -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}} -DBoost_ARCHITECTURE=-arm64
5337

5438
- name: Build
5539
env:
@@ -60,7 +44,7 @@ jobs:
6044
permissions:
6145
contents: none
6246
name: Send Notification to Discord on Failure
63-
runs-on: ubuntu-20.04
47+
runs-on: ubuntu-latest
6448
needs: # make sure the notification is sent AFTER the jobs you want included have completed
6549
- build
6650
if: failure()

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
8686
notify:
8787
name: Send Notification to Discord on Failure
88-
runs-on: ubuntu-22.04
88+
runs-on: ubuntu-latest
8989
permissions:
9090
contents: none
9191
needs: # make sure the notification is sent AFTER the jobs you want included have completed

.github/workflows/windows-release.yml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Windows Release Build
22

3-
#
43
on:
54
schedule:
65
# every day at 6am
@@ -11,9 +10,6 @@ env:
1110
BUILD_TYPE: RelWithDebInfo
1211
REPO_DIR : ${{github.workspace}}
1312
BUILD_DIR: ${{github.workspace}}/bin/builddir
14-
BOOST_TOOLSET: "msvc"
15-
BOOST_VERSION: "1.83.0"
16-
BOOST_PLATFORM_VERSION: "2022"
1713

1814
jobs:
1915
build:
@@ -50,26 +46,9 @@ jobs:
5046
run: |
5147
echo "ARCHIVE_FILENAME=$env:CI_REPOSITORY_NAME-${{matrix.TYPE}}-$env:CI_SHA_SHORT.zip" >> $env:GITHUB_ENV
5248
cmake -E make_directory ${{ env.BUILD_DIR }}
53-
54-
# install dependencies
55-
- name: Install Boost
56-
uses: MarkusJx/install-boost@v2.5.0
57-
id: install-boost
58-
with:
59-
# REQUIRED: Specify the required boost version
60-
# A list of supported versions can be found here:
61-
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
62-
boost_version: ${{env.BOOST_VERSION}}
63-
# OPTIONAL: Specify a platform version
64-
platform_version: ${{env.BOOST_PLATFORM_VERSION}}
65-
# OPTIONAL: Specify a toolset
66-
toolset: ${{env.BOOST_TOOLSET}}
67-
# NOTE: If a boost version matching all requirements cannot be found,
68-
# this build step will fail
49+
choco install boost-msvc-14.3
6950
7051
- name: Configure
71-
env:
72-
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
7352
run: cmake ${{matrix.OPTIONAL_DEFINES}} -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}
7453

7554
- name: Build
@@ -136,7 +115,7 @@ jobs:
136115

137116
notify-success:
138117
name: Send Notification to Discord on Success
139-
runs-on: ubuntu-20.04
118+
runs-on: ubuntu-latest
140119
permissions:
141120
contents: none
142121
needs:
@@ -179,7 +158,7 @@ jobs:
179158

180159
notify:
181160
name: Send Notification to Discord on Failure
182-
runs-on: ubuntu-20.04
161+
runs-on: ubuntu-latest
183162
permissions:
184163
contents: none
185164
needs: # make sure the notification is sent AFTER the jobs you want included have completed
@@ -205,4 +184,4 @@ jobs:
205184
- **Commit:** [${{github.repository}}/${{env.GIT_SHORT_SHA}}](${{github.server_url}}/${{ github.repository }}/commit/${{github.sha}})
206185
- **Build Log:** [actions/runs/${{github.run_id}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})
207186
footer: CMaNGOS Developers Notified!
208-
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
187+
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/windows.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Windows Build
32

43
on: [push]
@@ -8,9 +7,6 @@ env:
87
BUILD_TYPE: Release
98
REPO_DIR : ${{github.workspace}}
109
BUILD_DIR: ${{github.workspace}}/bin/builddir
11-
BOOST_TOOLSET: "msvc"
12-
BOOST_VERSION: "1.83.0"
13-
BOOST_PLATFORM_VERSION: "2022"
1410

1511
jobs:
1612
build:
@@ -29,26 +25,9 @@ jobs:
2925
echo "GITHUB_SHORT_REV=$(git rev-parse --short HEAD)" >> $env:GITHUB_ENV
3026
echo "ARCHIVE_FILENAME=${{ github.event.repository.name }}-$(git rev-parse --short HEAD).zip" >> $env:GITHUB_ENV
3127
cmake -E make_directory ${{ env.BUILD_DIR }}
28+
choco install boost-msvc-14.3
3229
33-
# install dependencies
34-
- name: Install Boost
35-
uses: MarkusJx/install-boost@v2.5.0
36-
id: install-boost
37-
with:
38-
# REQUIRED: Specify the required boost version
39-
# A list of supported versions can be found here:
40-
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
41-
boost_version: ${{env.BOOST_VERSION}}
42-
# OPTIONAL: Specify a platform version
43-
platform_version: ${{env.BOOST_PLATFORM_VERSION}}
44-
# OPTIONAL: Specify a toolset
45-
toolset: ${{env.BOOST_TOOLSET}}
46-
# NOTE: If a boost version matching all requirements cannot be found,
47-
# this build step will fail
48-
4930
- name: Configure
50-
env:
51-
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
5231
run: cmake -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}
5332

5433
- name: Build
@@ -69,7 +48,7 @@ jobs:
6948

7049
notify:
7150
name: Send Notification to Discord on Failure
72-
runs-on: ubuntu-20.04
51+
runs-on: ubuntu-latest
7352
permissions:
7453
contents: none
7554
needs: # make sure the notification is sent AFTER the jobs you want included have completed
@@ -95,4 +74,4 @@ jobs:
9574
- **Commit:** [${{github.repository}}/${{env.GIT_SHORT_SHA}}](${{github.server_url}}/${{ github.repository }}/commit/${{github.sha}})
9675
- **Build Log:** [actions/runs/${{github.run_id}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})
9776
footer: CMaNGOS Developers Notified!
98-
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
77+
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

cmake/macros/FindMySQL.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ if( UNIX )
2323
/usr/local/bin/
2424
/usr/bin/
2525
/usr/local/opt/mysql/bin/
26+
/opt/homebrew/opt/mysql-client/bin
27+
/opt/homebrew/opt/mysql-client@8.4/bin
2628
/opt/mysql/mysql/bin/
2729
)
2830

@@ -77,6 +79,10 @@ find_path(MYSQL_INCLUDE_DIR
7779
/usr/local/opt/mysql/include
7880
/usr/local/opt/mysql-client/include
7981
/usr/local/opt/mysql-client/include/mysql
82+
/opt/homebrew/opt/mysql-client
83+
/opt/homebrew/opt/mysql-client/include
84+
/opt/homebrew/opt/mysql-client@8.4
85+
/opt/homebrew/opt/mysql-client@8.4/include
8086
/opt/mysql/mysql/include
8187
/opt/mysql/mysql/include/mysql
8288
"C:/Program Files/MySQL/include"
@@ -107,6 +113,10 @@ foreach(LIB ${MYSQL_ADD_LIBRARIES})
107113
/usr/local/mysql/lib/mysql
108114
/usr/local/opt/mysql/lib
109115
/usr/local/opt/mysql-client/lib
116+
/opt/homebrew/opt/mysql-client
117+
/opt/homebrew/opt/mysql-client/lib
118+
/opt/homebrew/opt/mysql-client@8.4
119+
/opt/homebrew/opt/mysql-client@8.4/lib
110120
/opt/mysql/mysql/lib
111121
/opt/mysql/mysql/lib/mysql
112122
DOC "Specify the location of the mysql library here."

0 commit comments

Comments
 (0)