-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (101 loc) · 3.48 KB
/
build.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
on:
push:
pull_request:
workflow_dispatch:
jobs:
build_linux_native:
name: Build on Linux with native tools
runs-on: ubuntu-latest
steps:
- name: Get application code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Get Pre-reqs
run: DEBIAN_FRONTEND=noninteractive && sudo apt-get update -qq && sudo apt-get install -yqq gcc-arm-none-eabi binutils-arm-none-eabi build-essential libsecret-1-dev cmake curl git
- name: Build application code
run: cmake -S . -B build && cmake --build build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mv-http-demo-linux-native
path: ${{ github.workspace }}/build/app/mv-http-demo.*
build_linux_docker:
name: Build on Linux with Docker
runs-on: ubuntu-latest
steps:
- name: Get application code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build Docker image
run: docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t mv-http-image-lin-dock .
- name: Build application code
run: docker run --rm -v $(pwd)/:/home/mvisor/project/ --env BUILD_ONLY=true --name mv-http-lin-dock mv-http-image-lin-dock
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mv-http-demo-linux-docker
path: ${{ github.workspace }}/build/app/mv-http-demo.*
build_win_wsl:
name: Build on Windows with WSL
runs-on: windows-latest
defaults:
run:
shell: wsl-bash {0}
steps:
- name: Get WSL
uses: Vampire/setup-wsl@v3
with:
distribution: Ubuntu-20.04
- name: Get application code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Get Pre-reqs
run: DEBIAN_FRONTEND=noninteractive && sudo apt-get update -qq && apt-get install -yqq gcc-arm-none-eabi binutils-arm-none-eabi build-essential libsecret-1-dev cmake curl git
- name: Build code
run: cmake -S . -B build && cmake --build build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mv-http-demo-win-wsl
path: ${{ github.workspace }}/build/app/mv-http-demo.*
build_mac_docker:
name: Build on macOS with Docker
runs-on: macos-13
steps:
- name: Get application code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Get Docker
run: brew install docker colima
- name: Run Docker
run: colima start
- name: Build docker image
run: docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t mv-http-image-mac-dock .
- name: Build code
run: docker run --rm -v $(pwd)/:/home/mvisor/project/ --env BUILD_ONLY=true --name mv-http-mac-dock mv-http-image-mac-dock
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mv-http-demo-mac-docker
path: ${{ github.workspace }}/build/app/mv-http-demo.*
build_mac_native:
name: Build on macOS with native tooling
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Get Pre-reqs
run: brew install --cask gcc-arm-embedded
- name: Build code
run: cmake -S . -B build && cmake --build build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mv-clock-demo-mac-native
path: ${{ github.workspace }}/build/app/mv-http-demo.*