point build action to new target
This commit is contained in:
parent
f7cf2a6c4d
commit
b9c9ec071a
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
@ -9,30 +9,24 @@ on:
|
|||||||
env:
|
env:
|
||||||
COLOR: BLUE
|
COLOR: BLUE
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/armmbed/mbed-os-env:latest
|
image: ghcr.io/armmbed/mbed-os-env:latest
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Work around CVE-2022-24765
|
with:
|
||||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
submodules: recursive
|
||||||
- name: Compile starter-project app
|
- name: Compile movement firmware
|
||||||
run: make
|
run: make
|
||||||
working-directory: 'apps/starter-project'
|
working-directory: '.'
|
||||||
- name: Compile accelerometer-test app
|
- name: Upload artifacts
|
||||||
run: make
|
|
||||||
working-directory: 'apps/accelerometer-test'
|
|
||||||
- name: Compile movement
|
|
||||||
run: make
|
|
||||||
working-directory: 'movement/make'
|
|
||||||
- name: Upload UF2
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: watch.uf2
|
name: movement.uf2
|
||||||
path: movement/make/build/watch.uf2
|
path: build/firmware.uf2
|
||||||
|
|
||||||
build-simulator:
|
build-simulator:
|
||||||
container:
|
container:
|
||||||
@ -40,19 +34,17 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Work around CVE-2022-24765
|
|
||||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
||||||
- name: Compile movement
|
- name: Compile movement
|
||||||
run: emmake make
|
run: emmake make
|
||||||
working-directory: 'movement/make'
|
working-directory: '.'
|
||||||
- name: Archive simulator build
|
- name: Archive simulator build
|
||||||
working-directory: 'movement/make/build-sim'
|
working-directory: 'movement/make/build-sim'
|
||||||
run: |
|
run: |
|
||||||
cp watch.html index.html
|
cp watch.html index.html
|
||||||
tar -czf simulator.tar.gz index.html watch.wasm watch.js
|
tar -czf movement.tar.gz index.html watch.wasm watch.js
|
||||||
- name: Upload simulator build
|
- name: Upload simulator build
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: simulator.tar.gz
|
name: movement.tar.gz
|
||||||
path: movement/make/build-sim/simulator.tar.gz
|
path: build-sim/movement.tar.gz
|
||||||
|
|||||||
16
Makefile
16
Makefile
@ -8,10 +8,24 @@ BOARD=sensorwatch_green
|
|||||||
# Leave this line here.
|
# Leave this line here.
|
||||||
include $(GOSSAMER_PATH)/make.mk
|
include $(GOSSAMER_PATH)/make.mk
|
||||||
|
|
||||||
|
# this is a hack and does not currently work; we need to integrate a bit of
|
||||||
|
# emscripten support into gossamer to actually build for the simulator
|
||||||
|
ifdef EMSCRIPTEN
|
||||||
|
BUILD = ./build-sim
|
||||||
|
CC = emcc
|
||||||
|
all: $(BUILD)/$(BIN).html
|
||||||
|
$(BUILD)/$(BIN).html: $(OBJS)
|
||||||
|
@echo HTML $@
|
||||||
|
@$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ \
|
||||||
|
-s ASYNCIFY=1 \
|
||||||
|
-s EXPORTED_RUNTIME_METHODS=lengthBytesUTF8,printErr \
|
||||||
|
-s EXPORTED_FUNCTIONS=_main \
|
||||||
|
--shell-file=$(TOP)/watch-library/simulator/shell.html
|
||||||
|
endif
|
||||||
|
|
||||||
# Add your source files here.
|
# Add your source files here.
|
||||||
SRCS += \
|
SRCS += \
|
||||||
./movement.c \
|
./movement.c \
|
||||||
|
|
||||||
# Finally, leave this line at the bottom of the file.
|
# Finally, leave this line at the bottom of the file.
|
||||||
include $(GOSSAMER_PATH)/rules.mk
|
include $(GOSSAMER_PATH)/rules.mk
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user