diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index febfbb7600..0aeb132202 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: strategy: max-parallel: 4 matrix: - targets: [targets-group-1, targets-group-2, targets-group-3, targets-group-4, targets-group-5, targets-group-6, targets-group-7, targets-group-rest] + targets: [targets-group-1, targets-group-2, targets-group-3, targets-group-rest] outputs: buildtag: ${{ steps.ids.outputs.buildtag }} shortsha: ${{ steps.ids.outputs.shortsha }} @@ -59,9 +59,7 @@ jobs: continue-on-error: true - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '2.7' + uses: actions/setup-python@v2 # EmuFlight version - name: Get code version diff --git a/Makefile b/Makefile index 6582da38ee..706148d9f0 100644 --- a/Makefile +++ b/Makefile @@ -383,19 +383,7 @@ targets-group-2: $(GROUP_2_TARGETS) ## targets-group-3 : build some targets targets-group-3: $(GROUP_3_TARGETS) -## targets-group-4 : build some targets -targets-group-4: $(GROUP_4_TARGETS) - -## targets-group-5 : build some targets -targets-group-5: $(GROUP_5_TARGETS) - -## targets-group-6 : build some targets -targets-group-6: $(GROUP_6_TARGETS) - -## targets-group-7 : build some targets -targets-group-7: $(GROUP_7_TARGETS) - -## targets-group-rest: build the rest of the targets (not listed in group 1, 2, 3...) +## targets-group-rest: build the rest of the targets (not listed in group 1, 2 or 3) targets-group-rest: $(GROUP_OTHER_TARGETS) $(VALID_TARGETS): @@ -508,20 +496,10 @@ targets: @echo "Base target: $(BASE_TARGET)" @echo "targets-group-1: $(GROUP_1_TARGETS)" @echo "targets-group-2: $(GROUP_2_TARGETS)" - @echo "targets-group-3: $(GROUP_3_TARGETS)" - @echo "targets-group-4: $(GROUP_4_TARGETS)" - @echo "targets-group-5: $(GROUP_5_TARGETS)" - @echo "targets-group-6: $(GROUP_6_TARGETS)" - @echo "targets-group-7: $(GROUP_7_TARGETS)" @echo "targets-group-rest: $(GROUP_OTHER_TARGETS)" @echo "targets-group-1: $(words $(GROUP_1_TARGETS)) targets" @echo "targets-group-2: $(words $(GROUP_2_TARGETS)) targets" - @echo "targets-group-3: $(words $(GROUP_3_TARGETS)) targets" - @echo "targets-group-4: $(words $(GROUP_4_TARGETS)) targets" - @echo "targets-group-5: $(words $(GROUP_5_TARGETS)) targets" - @echo "targets-group-6: $(words $(GROUP_6_TARGETS)) targets" - @echo "targets-group-7: $(words $(GROUP_7_TARGETS)) targets" @echo "targets-group-rest: $(words $(GROUP_OTHER_TARGETS)) targets" @echo "total in all groups $(words $(SUPPORTED_TARGETS)) targets" diff --git a/make/linux.mk b/make/linux.mk index 9656c23722..ba1744fcbd 100644 --- a/make/linux.mk +++ b/make/linux.mk @@ -6,26 +6,30 @@ # and the ARM toolchain installed to either the Taulabs/tools directory, their # respective default installation locations, or made available on the system path. -# First look for `python3`. If `which` doesn't return a null value, then it exists! -ifneq ($(shell which python3), "") - PYTHON:=python3 +# Check for and find Python 2 + +# Get Python version, separate major/minor/patch, then put into wordlist +PYTHON_VERSION_=$(wordlist 2,4,$(subst ., ,$(shell python -V 2>&1))) +# Get major version from aforementioned list +PYTHON_MAJOR_VERSION_=$(word 1,$(PYTHON_VERSION_)) +# Just in case Make has some weird scope stuff +PYTHON=0 +# If the major Python version is the one we want.. +ifeq ($(PYTHON_MAJOR_VERSION_),2) + # Then we can just use the normal Python executable + PYTHON:=python else - # Get Python version, separate major/minor/patch, then put into wordlist - PYTHON_VERSION_=$(wordlist 2,4,$(subst ., ,$(shell python -V 2>&1))) - # Get major version from aforementioned list - PYTHON_MAJOR_VERSION_=$(word 1,$(PYTHON_VERSION_)) - # Just in case Make has some weird scope stuff - PYTHON=0 - # If the major Python version is the one we want.. - ifeq ($(PYTHON_MAJOR_VERSION_),3) - # Then we can just use the normal Python executable - PYTHON:=python - else - # And if it doesn't exist, let's use the default Python, and warn the user. - # PYTHON NOT FOUND. - PYTHON:=python - echo "Python not found." - endif + # However, this isn't always the case.. + # Let's look for `python2`. If `which` doesn't return a null value, then + # it exists! + ifneq ($(shell which python2), "") + PYTHON:=python2 + else + # And if it doesn't exist, let's use the default Python, and warn the user. + # PYTHON NOT FOUND. + PYTHON:=python + echo "Python not found." + endif endif export PYTHON diff --git a/make/targets.mk b/make/targets.mk index 0dc36f9f69..ef439980d3 100644 --- a/make/targets.mk +++ b/make/targets.mk @@ -84,7 +84,7 @@ UNSUPPORTED_TARGETS := \ SUPPORTED_TARGETS := $(filter-out $(UNSUPPORTED_TARGETS), $(VALID_TARGETS)) TARGETS_TOTAL := $(words $(SUPPORTED_TARGETS)) -TARGET_GROUPS := 8 +TARGET_GROUPS := 4 TARGETS_PER_GROUP := $(shell expr $(TARGETS_TOTAL) / $(TARGET_GROUPS) ) ST := 1 @@ -99,22 +99,6 @@ ST := $(shell expr $(ET) + 1) ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP)) GROUP_3_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS)) -ST := $(shell expr $(ET) + 1) -ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP)) -GROUP_4_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS)) - -ST := $(shell expr $(ET) + 1) -ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP)) -GROUP_5_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS)) - -ST := $(shell expr $(ET) + 1) -ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP)) -GROUP_6_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS)) - -ST := $(shell expr $(ET) + 1) -ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP)) -GROUP_7_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))