Skip to content

Commit b58ec83

Browse files
committed
Clean up github action, fix git describe breaking CI
With github actions it only checks out a shallow copy of the repo, not including tags. git describe by default looks for tags, but the --always flag added here lets it fall back to an acceptable default when it doesn't find a tag. While I was doing that I cleaned up the current test workflow: - latest versions of all the actions - oresat-configs now can come straight from pypi, we don't need to build it ourselves - trim packages and tools to only what's used for the compiles below. There's a lot less packages to download now and it's noticeably faster.
1 parent b93f89c commit b58ec83

File tree

11 files changed

+18
-35
lines changed

11 files changed

+18
-35
lines changed

.github/workflows/tests.yaml

+8-25
Original file line numberDiff line numberDiff line change
@@ -10,53 +10,36 @@ on:
1010

1111
jobs:
1212
tests:
13-
1413
runs-on: ubuntu-latest
1514
timeout-minutes: 10
1615

1716
steps:
1817
- name: Clone this repository
19-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
2019
with:
2120
submodules: 'true'
2221

23-
- name: Clone oresat-configs repository
24-
uses: actions/checkout@v3
25-
with:
26-
repository: oresat/oresat-configs
27-
path: resources/oresat-configs
28-
2922
- name: Set up Python 3.10
30-
uses: actions/setup-python@v3
23+
uses: actions/setup-python@v5
3124
with:
3225
python-version: "3.10"
3326

34-
- name: Build and install oresat-configs
35-
working-directory: resources/oresat-configs
27+
- name: Install oresat-configs
3628
run: |
3729
python -m pip install --upgrade pip
38-
pip install -r requirements.txt
39-
python -m build
40-
pip install dist/*.whl
41-
42-
- name: Clean up oresat-configs
43-
run: rm -rf resources/oresat-configs
30+
pip install oresat-configs
4431
4532
- name: Install Ubuntu dependencies
4633
run: |
47-
sudo apt install autoconf automake gcc-arm-none-eabi libcapstone4 libftdi1-2 libgpiod2 libhidapi-hidraw0 libtool libusb-1.0-0 libusb-1.0-0-dev pkg-config srecord stlink-tools tcl xxd patch
48-
49-
- name: Install eds-utils
50-
run: |
51-
python -m pip install --upgrade pip
52-
pip install --no-deps eds-utils
34+
sudo apt update
35+
sudo apt install -y gcc-arm-none-eabi srecord xxd
5336
5437
- name: Apply C3 patches
5538
working-directory:
5639
ext/ChibiOS
5740
run: |
58-
patch -p0 < ./../../src/f4/app_control/stm32f42x_43x_efl.patch
59-
patch -p1 < ./../../src/f4/app_control/stm32f439_hmacsha256.patch
41+
patch -p0 < ../../src/f4/app_control/stm32f42x_43x_efl.patch
42+
patch -p1 < ../../src/f4/app_control/stm32f439_hmacsha256.patch
6043
6144
- name: Compile f0 apps
6245
run: |

src/f0/app_adcs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ ifeq ($(ORESAT),)
111111
ORESAT = 0.5
112112
endif
113113
# generate OD.c/OD.h from oresat-configs
114-
FW_VERSION = $(shell git describe)
114+
FW_VERSION = $(shell git describe --always)
115115
$(shell oresat-gen-fw-files --oresat $(ORESAT) imu -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
116116
# add them
117117
ALLCSRC += $(ODDIR)/OD.c

src/f0/app_battery/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ ifeq ($(ORESAT),)
116116
endif
117117

118118
# generate OD.c/OD.h from oresat-configs
119-
FW_VERSION = $(shell git describe)
119+
FW_VERSION = $(shell git describe --always)
120120
$(shell oresat-gen-fw-files --oresat $(ORESAT) battery -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD) -fw $(FW_VERSION) -hw $(BOARD))
121121
# add them
122122
ALLCSRC += $(ODDIR)/OD.c

src/f0/app_devboard/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ ifeq ($(ORESAT),)
116116
endif
117117

118118
# generate OD.c/OD.h from oresat-configs
119-
FW_VERSION = $(shell git describe)
119+
FW_VERSION = $(shell git describe --always)
120120
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
121121
# add them
122122
ALLCSRC += $(ODDIR)/OD.c

src/f0/app_protocard/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ ifeq ($(ORESAT),)
116116
endif
117117

118118
# generate OD.c/OD.h from oresat-configs
119-
FW_VERSION = $(shell git describe)
119+
FW_VERSION = $(shell git describe --always)
120120
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
121121
# add them
122122
ALLCSRC += $(ODDIR)/OD.c

src/f0/app_solar/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ ifeq ($(ORESAT),)
116116
endif
117117

118118
# generate OD.c/OD.h from oresat-configs
119-
FW_VERSION = $(shell git describe)
119+
FW_VERSION = $(shell git describe --always)
120120
$(shell oresat-gen-fw-files --oresat $(ORESAT) solar -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
121121
# add them
122122
ALLCSRC += $(ODDIR)/OD.c

src/f4/app_cantest/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
FW_VERSION = $(shell git describe)
114+
FW_VERSION = $(shell git describe --always)
115115
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
116116
# add them
117117
ALLCSRC += $(ODDIR)/OD.c

src/f4/app_control/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
FW_VERSION = $(shell git describe)
114+
FW_VERSION = $(shell git describe --always)
115115
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
116116
# add them
117117
ALLCSRC += $(ODDIR)/OD.c

src/f4/app_devboard/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
FW_VERSION = $(shell git describe)
114+
FW_VERSION = $(shell git describe --always)
115115
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
116116
# add them
117117
ALLCSRC += $(ODDIR)/OD.c

src/l4/app_devboard/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
FW_VERSION = $(shell git describe)
114+
FW_VERSION = $(shell git describe --always)
115115
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
116116
# add them
117117
ALLCSRC += $(ODDIR)/OD.c

src/l4/app_devboard_cpp/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
FW_VERSION = $(shell git describe)
114+
FW_VERSION = $(shell git describe --always)
115115
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
116116
# add them
117117
ALLCSRC += $(ODDIR)/OD.c

0 commit comments

Comments
 (0)