Skip to content

Commit 1bdcf9d

Browse files
committed
Github Actions - Link Artifacts in PR comments
1 parent 3fe7bd0 commit 1bdcf9d

File tree

4 files changed

+27
-63
lines changed

4 files changed

+27
-63
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
max-parallel: 4
2121
matrix:
22-
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]
22+
targets: [targets-group-1, targets-group-2, targets-group-3, targets-group-rest]
2323
outputs:
2424
buildtag: ${{ steps.ids.outputs.buildtag }}
2525
shortsha: ${{ steps.ids.outputs.shortsha }}
@@ -59,9 +59,7 @@ jobs:
5959
continue-on-error: true
6060

6161
- name: Setup Python
62-
uses: actions/setup-python@v5
63-
with:
64-
python-version: '2.7'
62+
uses: actions/setup-python@v2
6563

6664
# EmuFlight version
6765
- name: Get code version

Makefile

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -383,19 +383,7 @@ targets-group-2: $(GROUP_2_TARGETS)
383383
## targets-group-3 : build some targets
384384
targets-group-3: $(GROUP_3_TARGETS)
385385

386-
## targets-group-4 : build some targets
387-
targets-group-4: $(GROUP_4_TARGETS)
388-
389-
## targets-group-5 : build some targets
390-
targets-group-5: $(GROUP_5_TARGETS)
391-
392-
## targets-group-6 : build some targets
393-
targets-group-6: $(GROUP_6_TARGETS)
394-
395-
## targets-group-7 : build some targets
396-
targets-group-7: $(GROUP_7_TARGETS)
397-
398-
## targets-group-rest: build the rest of the targets (not listed in group 1, 2, 3...)
386+
## targets-group-rest: build the rest of the targets (not listed in group 1, 2 or 3)
399387
targets-group-rest: $(GROUP_OTHER_TARGETS)
400388

401389
$(VALID_TARGETS):
@@ -508,20 +496,10 @@ targets:
508496
@echo "Base target: $(BASE_TARGET)"
509497
@echo "targets-group-1: $(GROUP_1_TARGETS)"
510498
@echo "targets-group-2: $(GROUP_2_TARGETS)"
511-
@echo "targets-group-3: $(GROUP_3_TARGETS)"
512-
@echo "targets-group-4: $(GROUP_4_TARGETS)"
513-
@echo "targets-group-5: $(GROUP_5_TARGETS)"
514-
@echo "targets-group-6: $(GROUP_6_TARGETS)"
515-
@echo "targets-group-7: $(GROUP_7_TARGETS)"
516499
@echo "targets-group-rest: $(GROUP_OTHER_TARGETS)"
517500

518501
@echo "targets-group-1: $(words $(GROUP_1_TARGETS)) targets"
519502
@echo "targets-group-2: $(words $(GROUP_2_TARGETS)) targets"
520-
@echo "targets-group-3: $(words $(GROUP_3_TARGETS)) targets"
521-
@echo "targets-group-4: $(words $(GROUP_4_TARGETS)) targets"
522-
@echo "targets-group-5: $(words $(GROUP_5_TARGETS)) targets"
523-
@echo "targets-group-6: $(words $(GROUP_6_TARGETS)) targets"
524-
@echo "targets-group-7: $(words $(GROUP_7_TARGETS)) targets"
525503
@echo "targets-group-rest: $(words $(GROUP_OTHER_TARGETS)) targets"
526504
@echo "total in all groups $(words $(SUPPORTED_TARGETS)) targets"
527505

make/linux.mk

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,30 @@
66
# and the ARM toolchain installed to either the Taulabs/tools directory, their
77
# respective default installation locations, or made available on the system path.
88

9-
# First look for `python3`. If `which` doesn't return a null value, then it exists!
10-
ifneq ($(shell which python3), "")
11-
PYTHON:=python3
9+
# Check for and find Python 2
10+
11+
# Get Python version, separate major/minor/patch, then put into wordlist
12+
PYTHON_VERSION_=$(wordlist 2,4,$(subst ., ,$(shell python -V 2>&1)))
13+
# Get major version from aforementioned list
14+
PYTHON_MAJOR_VERSION_=$(word 1,$(PYTHON_VERSION_))
15+
# Just in case Make has some weird scope stuff
16+
PYTHON=0
17+
# If the major Python version is the one we want..
18+
ifeq ($(PYTHON_MAJOR_VERSION_),2)
19+
# Then we can just use the normal Python executable
20+
PYTHON:=python
1221
else
13-
# Get Python version, separate major/minor/patch, then put into wordlist
14-
PYTHON_VERSION_=$(wordlist 2,4,$(subst ., ,$(shell python -V 2>&1)))
15-
# Get major version from aforementioned list
16-
PYTHON_MAJOR_VERSION_=$(word 1,$(PYTHON_VERSION_))
17-
# Just in case Make has some weird scope stuff
18-
PYTHON=0
19-
# If the major Python version is the one we want..
20-
ifeq ($(PYTHON_MAJOR_VERSION_),3)
21-
# Then we can just use the normal Python executable
22-
PYTHON:=python
23-
else
24-
# And if it doesn't exist, let's use the default Python, and warn the user.
25-
# PYTHON NOT FOUND.
26-
PYTHON:=python
27-
echo "Python not found."
28-
endif
22+
# However, this isn't always the case..
23+
# Let's look for `python2`. If `which` doesn't return a null value, then
24+
# it exists!
25+
ifneq ($(shell which python2), "")
26+
PYTHON:=python2
27+
else
28+
# And if it doesn't exist, let's use the default Python, and warn the user.
29+
# PYTHON NOT FOUND.
30+
PYTHON:=python
31+
echo "Python not found."
32+
endif
2933
endif
3034

3135
export PYTHON

make/targets.mk

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ UNSUPPORTED_TARGETS := \
8484
SUPPORTED_TARGETS := $(filter-out $(UNSUPPORTED_TARGETS), $(VALID_TARGETS))
8585

8686
TARGETS_TOTAL := $(words $(SUPPORTED_TARGETS))
87-
TARGET_GROUPS := 8
87+
TARGET_GROUPS := 4
8888
TARGETS_PER_GROUP := $(shell expr $(TARGETS_TOTAL) / $(TARGET_GROUPS) )
8989

9090
ST := 1
@@ -99,22 +99,6 @@ ST := $(shell expr $(ET) + 1)
9999
ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP))
100100
GROUP_3_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS))
101101

102-
ST := $(shell expr $(ET) + 1)
103-
ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP))
104-
GROUP_4_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS))
105-
106-
ST := $(shell expr $(ET) + 1)
107-
ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP))
108-
GROUP_5_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS))
109-
110-
ST := $(shell expr $(ET) + 1)
111-
ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP))
112-
GROUP_6_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS))
113-
114-
ST := $(shell expr $(ET) + 1)
115-
ET := $(shell expr $(ST) + $(TARGETS_PER_GROUP))
116-
GROUP_7_TARGETS := $(wordlist $(ST), $(ET), $(SUPPORTED_TARGETS))
117-
118102
GROUP_OTHER_TARGETS := $(filter-out $(GROUP_1_TARGETS) $(GROUP_2_TARGETS) $(GROUP_3_TARGETS), $(SUPPORTED_TARGETS))
119103

120104
ifeq ($(filter $(TARGET),$(ALT_TARGETS)), $(TARGET))

0 commit comments

Comments
 (0)