-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Mac/Docker, Win/WSL Linux native GH Action builds
- Loading branch information
smittytone
committed
Nov 29, 2023
1 parent
ab47dc6
commit 2652735
Showing
1 changed file
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,86 @@ | ||
on: | ||
on:App | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 18 * * *' | ||
|
||
jobs: | ||
Build: | ||
name: Build | ||
build_linux_native: | ||
name: Build on Linux with native tools | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get application code | ||
uses: actions/checkout@v3 | ||
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@v3 | ||
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@v3 | ||
with: | ||
submodules: 'recursive' | ||
- name: Build Docker image | ||
run: docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t microvisor-http-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 microvisor-http-demo microvisor-http-image | ||
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@v3 | ||
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@v2 | ||
with: | ||
distribution: Ubuntu-20.04 | ||
- name: Get application code | ||
uses: actions/checkout@v3 | ||
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@v3 | ||
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-latest | ||
steps: | ||
- name: Get application code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
- name: Get Docker | ||
run: brew install docker | ||
- 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@v3 | ||
with: | ||
name: mv-freertos-cmsis-demo-mac-docker | ||
path: ${{ github.workspace }}/build/app/mv-http-demo.* |