Skip to content

Commit

Permalink
4 parallel builds (#311)
Browse files Browse the repository at this point in the history
* meh, can't we just let Travis die already?

Co-authored-by: Quick-Flash <[email protected]>
  • Loading branch information
nerdCopter and Quick-Flash authored Jul 9, 2020
1 parent bc66dfe commit 1f5f07b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
build:
timeout-minutes: 75
strategy:
max-parallel: 3
max-parallel: 4
matrix:
targets: [targets-group-1, targets-group-2, targets-group-rest]
targets: [targets-group-1, targets-group-2, targets-group-3, targets-group-rest]
runs-on: ubuntu-latest
steps:

Expand Down
2 changes: 1 addition & 1 deletion .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ make ${GOAL} || exit $?
export EMU_VERSION="$(make version)"

# compose string to reference the artifacts (binaries)
export PACKAGE_VERSION="${TRAVIS_BUILD_NUMBER}-${EMU_VERSION}-${TRAVIS_BRANCH}"
export PACKAGE_VERSION="Travis_Build_${TRAVIS_BUILD_NUMBER}_${EMU_VERSION}_${TRAVIS_BRANCH}"

# process template for pushing to bintray
j2 bintray-template.j2 -o bintray-conf.json
Expand Down
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ env:
matrix:
- GOAL=targets-group-1 # make all (in parallel)
- GOAL=targets-group-2
- GOAL=targets-group-3
- GOAL=targets-group-rest
# - GOAL=FURYF4OSD
# - GOAL=MATEKF411
global:
# - DEBUG=RELWITHDEBINFO # debug symbols
- CCACHE_SLOPPINESS="file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches"
Expand All @@ -16,7 +15,7 @@ env:
- PATH="$HOME/.local/bin:$PATH" # "user" installs (pip and stuff)

git:
depth: 5 # quick clone
depth: 20 # semi-quick clone
quiet: true # save on logfiles

addons:
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ targets-group-1: $(GROUP_1_TARGETS)
## targets-group-2 : build some targets
targets-group-2: $(GROUP_2_TARGETS)

## targets-group-3 : build some targets
targets-group-3: $(GROUP_3_TARGETS)

## targets-group-rest: build the rest of the targets (not listed in group 1, 2 or 3)
targets-group-rest: $(GROUP_OTHER_TARGETS)

Expand Down
8 changes: 6 additions & 2 deletions make/targets.mk
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ UNSUPPORTED_TARGETS := \
SUPPORTED_TARGETS := $(filter-out $(UNSUPPORTED_TARGETS), $(VALID_TARGETS))

TARGETS_TOTAL := $(words $(SUPPORTED_TARGETS))
TARGET_GROUPS := 3
TARGET_GROUPS := 4
TARGETS_PER_GROUP := $(shell expr $(TARGETS_TOTAL) / $(TARGET_GROUPS) )

ST := 1
Expand All @@ -92,7 +92,11 @@ ST := $(shell expr $(ET) + 1)
ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP))
GROUP_2_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS))

GROUP_OTHER_TARGETS := $(filter-out $(GROUP_1_TARGETS) $(GROUP_2_TARGETS), $(SUPPORTED_TARGETS))
ST := $(shell expr $(ET) + 1)
ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP))
GROUP_3_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS))

GROUP_OTHER_TARGETS := $(filter-out $(GROUP_1_TARGETS) $(GROUP_2_TARGETS) $(GROUP_3_TARGETS), $(SUPPORTED_TARGETS))

ifeq ($(filter $(TARGET),$(ALT_TARGETS)), $(TARGET))
BASE_TARGET := $(firstword $(subst /,, $(subst ./src/main/target/,, $(dir $(wildcard $(ROOT)/src/main/target/*/$(TARGET).mk)))))
Expand Down

0 comments on commit 1f5f07b

Please sign in to comment.