-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (63 loc) · 2 KB
/
compile_and_test.yml
File metadata and controls
74 lines (63 loc) · 2 KB
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
name: Compile and test Release & Debug builds
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build_and_test:
name: >
Build and test a ${{ matrix.build }} version of Lamscript on
${{ matrix.os }} with ${{ matrix.compiler }}.
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [ g++-10 ]
build: [Release, Debug]
include:
- os: ubuntu-latest
target: Linux
- os: macos-latest
target: Macos
- os: windows-latest
compiler: cl
target: Windows
build: Release
- os: windows-latest
compiler: cl
target: Windows
build: Debug
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run the projects setup.
run: ./scripts/setup.sh --within-ci true
- name: Add msbuild to PATH
if: ${{ matrix.os == 'windows-latest' }}
uses: microsoft/setup-msbuild@v1.0.2
- name: Compile a release build of lamscript
run: ./scripts/compile_lamscript.sh \
--build ${{ matrix.build }} \
--cpp-compiler ${{ matrix.compiler }} \
--os ${{ matrix.target }} \
--cores 2
- name: Run all of lamscripts tests.
run: ./scripts/run_all_tests.sh --os ${{ matrix.target }}
- uses: actions/setup-ruby@v1
- name: Send Webhook Notification for build status.
if: always()
env:
JOB_STATUS: ${{ job.status }}
WEBHOOK_URL: ${{ secrets.LAMSCRIPT_DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
JOB_ID: ${{ github.job }}
run: |
git clone https://github.com/dhinakg/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
shell: bash