Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decomission of scripts/ci #1760

Merged
merged 7 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ fabric.properties
# Binaries
source/Hexfile/
source/Objects/
BUILDS/

# Autogenerated
source/Core/Gen/
Expand Down Expand Up @@ -214,4 +215,3 @@ Logo GUI/TS100 Logo Editor/TS100 Logo Editor/bin/

# Tests/linters/sanitizers
source/check-style.log

1 change: 0 additions & 1 deletion Env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ services:
dockerfile: scripts/IronOS.Dockerfile
command: /bin/sh
volumes:
- ./scripts/ci:/build/ci:Z
- ./:/build/ironos:Z
22 changes: 21 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ ifndef MKDOCS
MKDOCS:=mkdocs
endif

# build output related directories
ifdef OUT
OUT_DIR=$(OUT)
else
OUT_DIR=$(CURDIR)/BUILDS
endif
OUT_HEX=$(CURDIR)/source/Hexfile


### global static variables

Expand Down Expand Up @@ -105,7 +113,7 @@ docker-shell: docker-check $(DOCKER_DEPS)

# former build.sh
docker-build: docker-check $(DOCKER_DEPS)
$(DOCKER_CMD) /bin/bash /build/ci/buildAll.sh
$(DOCKER_CMD) make build-all

# delete container
docker-clean: docker-check
Expand Down Expand Up @@ -157,6 +165,17 @@ tests: test-md test-sh test-py test-ccpp
@echo "All tests & checks have been completed successfully."
@echo ""

# former scripts/ci/buildAll.sh - all in one to build all firmware & place the produced binaries into one output directory
build-all:
@mkdir -p $(OUT_DIR)
@chmod 0777 $(OUT_DIR)
cd source && bash ./build.sh
@echo "All Firmware built"
@cp -r $(OUT_HEX)/*.bin $(OUT_DIR)
@cp -r $(OUT_HEX)/*.hex $(OUT_DIR)
ia marked this conversation as resolved.
Show resolved Hide resolved
@cp -r $(OUT_HEX)/*.dfu $(OUT_DIR)
@echo "Resulting output directory: $(OUT_DIR)"

# pass-through target for Makefile inside source/ dir
%:
$(MAKE) -C source/ $@
Expand All @@ -166,6 +185,7 @@ clean-build:
$(MAKE) -C source/ clean-all
rm -Rf site
rm -Rf scripts/ci/artefacts
rm -Rf $(OUT_DIR)

# global clean-up target
clean-full: clean-build docker-clean
Expand Down
1 change: 0 additions & 1 deletion scripts/IronOS.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ RUN python3 -m pip install ${PIP_PKGS}
RUN git config --global --add safe.directory /build/ironos

COPY . /build/ironos
COPY ./scripts/ci /build/ci
21 changes: 0 additions & 21 deletions scripts/ci/buildAll.sh

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 1 addition & 2 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ fi;
if [ -z "${cmd}" ] || [ "${cmd}" = "shell" ]; then
docker_cmd="run --rm builder"
elif [ "${cmd}" = "build" ]; then
docker_cmd="run --rm builder /bin/bash /build/ci/buildAll.sh"
docker_cmd="run --rm builder make build-all OUT=${OUT}"
elif [ "${cmd}" = "clean" ]; then
docker rmi ironos-builder:latest
exit "${?}"
Expand All @@ -211,4 +211,3 @@ echo -e "\t* type \"${0} clean\" to delete created container (but not cached dat
echo -e "\n====>>>> ${docker_bin} ${docker_file} ${docker_cmd}\n"
eval "${docker_bin} ${docker_file} ${docker_cmd}"
exit "${?}"