forked from cmangos/mangos-classic
-
Notifications
You must be signed in to change notification settings - Fork 24
79 lines (63 loc) · 2.08 KB
/
macos.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: MacOs build
# after every push
#on: [push]
# use manual run
on: [workflow_dispatch]
# use schedule
#on:
# schedule:
# # every day at 6am
# - cron: '0 6 * * *'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
REPO_DIR : ${{github.workspace}}
BUILD_DIR: ${{github.workspace}}/bin/builddir
jobs:
build:
runs-on: macos-10.15
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: ${{env.REPO_DIR}}
- name: Install dependencies
run: |
brew install boost mysql-client
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl)" >> $GITHUB_ENV
- name: Configure
run: cmake -DBoost_ARCHITECTURE=-x64 -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}
- name: Build
env:
MAKEFLAGS: "-j8"
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}}
notify:
name: Discord Notification
runs-on: ubuntu-latest
needs: # make sure the notification is sent AFTER the jobs you want included have completed
- build
steps:
- name: Notify Success
uses: rjstone/[email protected]
if: success()
with:
severity: info
description: MacOS build succeeded
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
avatarUrl: https://github.githubassets.com/favicons/favicon-success.png
- name: Notify Failure
uses: rjstone/[email protected]
if: failure()
with:
severity: error
description: MacOS build failed
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
avatarUrl: https://github.githubassets.com/favicons/favicon-failure.png
- name: Notify Cancelled
uses: rjstone/[email protected]
if: cancelled()
with:
severity: error
description: MacOS build cancelled
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png