-
Notifications
You must be signed in to change notification settings - Fork 4
76 lines (74 loc) · 2.49 KB
/
ci.yml
File metadata and controls
76 lines (74 loc) · 2.49 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
75
76
name: CI
on:
pull_request:
branches: [main]
workflow_dispatch:
jobs:
ci:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows (Intel)
os: windows-2022
- name: Windows (ARM)
os: windows-11-arm
- name: Linux (Intel)
os: ubuntu-22.04
- name: Linux (ARM)
os: ubuntu-22.04-arm
- name: macOS (Intel)
os: macos-15-intel
- name: macOS (ARM)
os: macos-15
- name: Code formatting
os: ubuntu-22.04
- name: Linting
os: ubuntu-22.04
- name: Type checking
os: ubuntu-22.04
steps:
- name: Set the timezone to New Zealand
uses: szenius/[email protected]
with:
timezoneWindows: 'New Zealand Standard Time'
timezoneLinux: 'Pacific/Auckland'
timezoneMacos: 'Pacific/Auckland'
- name: Check out OpenCOR
uses: actions/checkout@v4
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: OpenCOR dependencies
run: bun install
- name: Build OpenCOR
if: ${{ matrix.name != 'Code formatting' && matrix.name != 'Linting' && matrix.name != 'Type checking' }}
run: bun run build
- name: Build OpenCOR's Web app
if: ${{ matrix.name != 'Code formatting' && matrix.name != 'Linting' && matrix.name != 'Type checking' }}
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
run: bun build:web
- name: Build OpenCOR as a library
if: ${{ matrix.name != 'Code formatting' && matrix.name != 'Linting' && matrix.name != 'Type checking' }}
run: |
cd src/renderer
bun install
bun build:lib
- name: Code formatting
if: ${{ matrix.name == 'Code formatting' }}
run: bun format:check
- name: Linting
if: ${{ matrix.name == 'Linting' }}
run: bun lint
- name: Type checking
if: ${{ matrix.name == 'Type checking' }}
run: bun typecheck
- name: Clean OpenCOR
run: bun clean