-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (71 loc) · 2.56 KB
/
compile_lambda_rs.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
77
78
79
80
81
82
83
84
name: compile & test lambda-rs
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build_and_test:
name: Build lambda-rs on ${{ matrix.os }} with features ${{ matrix.features }}.
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-opengl"
- os: ubuntu-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-vulkan"
- os: windows-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-vulkan"
- os: windows-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-dx11"
- os: windows-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-dx12"
- os: macos-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-opengl"
- os: macos-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-metal"
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run the projects setup.
run: ./scripts/setup.sh --within-ci true
- name: Obtain Xorg for building on Ubuntu.
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install xorg-dev
- name: Add msbuild to PATH
if: ${{ matrix.os == 'windows-latest' }}
uses: microsoft/[email protected]
- name: Install ninja 1.10.2 on windows.
if: ${{ matrix.os == 'windows-latest' }}
run: choco install ninja
- name: Obtain rust toolchain for ${{ matrix.rustup-toolchain }}
run: |
rustup toolchain install ${{ matrix.rustup-toolchain }}
rustup default ${{ matrix.rustup-toolchain }}
- name: Build Lambda & other default workspace members.
run: cargo test --all --features ${{ matrix.features }} --no-default-features
- uses: actions/setup-ruby@v1
- name: Send Webhook Notification for build status.
if: ${{ github.ref == 'refs/heads/main' }}
env:
JOB_STATUS: ${{ job.status }}
WEBHOOK_URL: ${{ secrets.LAMBDA_BUILD_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