-
Notifications
You must be signed in to change notification settings - Fork 17
70 lines (66 loc) · 2.21 KB
/
compile.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
name: Compile test
on: [push, pull_request]
jobs:
compile_test:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: Install latest ecompile
run: |
wget -q https://github.com/polserver/polserver/releases/download/NightlyRelease/Nightly-Linux-clang.zip
unzip Nightly-Linux-clang.zip
rm -f *_dbg.zip
rm -f Nightly-Linux-clang.zip
unzip -j -o polserver*.zip
echo "Unzip Complete"
cp ecompile scripts/
cp *.em scripts/
echo "ModuleDirectory=scripts" >> scripts/ecompile.cfg
echo "IncludeDirectory=scripts" >> scripts/ecompile.cfg
echo "PolScriptRoot=scripts" >> scripts/ecompile.cfg
echo "PackageRoot=pkg" >> scripts/ecompile.cfg
echo "DisplaySummary=1" >> scripts/ecompile.cfg
echo "DisplayWarnings=1" >> scripts/ecompile.cfg
echo "CompileAspPages=1" >> scripts/ecompile.cfg
sudo apt-get update
sudo apt-get install clang-14 -y
- name: Compile
run: |
scripts/ecompile -A -T
if (( $(find . -name "*.ecl" | wc -l) < 1)); then echo "ERROR: Failed to find any compiled .ecl files"; exit 1; fi;
notify_on_failure:
needs: compile_test
runs-on: "ubuntu-latest"
if: failure()
steps:
- name: Discord notification failure
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: turleypol/actions-status-discord@master
with:
status: failure
job: Compile test
notify_on_success:
needs: compile_test
runs-on: "ubuntu-latest"
if: success()
steps:
- name: Discord notification success
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: turleypol/actions-status-discord@master
with:
status: success
job: Compile test
notify_on_cancel:
needs: compile_test
runs-on: "ubuntu-latest"
if: cancelled()
steps:
- name: Discord notification cancelled
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: turleypol/actions-status-discord@master
with:
status: cancelled
job: Compile test