Skip to content

Commit 4d90014

Browse files
authored
fix(platformio): 🐛 Use relative paths instead of absolute paths (#157)
When I initially containerised CFA, I had the hare-brained idea of using absolute paths in CFA's configuration files. Turns out, this led to obscure permission denial errors whenever I tried to run both PlatformIO commands or CFA's `build.py` script as a part of the QC and QL workflows. This resolves the broken QC and QL workflows. Everything should run as expected now.
1 parent 4e67ab5 commit 4d90014

File tree

8 files changed

+52
-48
lines changed

8 files changed

+52
-48
lines changed

.github/workflows/codeql.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ jobs:
9393

9494
# Build the Defect Detector with PlatformIO
9595
- name: Build defect detector
96-
run: pio run -e defect_detector
96+
run: |
97+
cd src/build/scripts
98+
python build.py
9799
98100
# Perform CodeQL Analysis
99101
- name: Perform CodeQL Analysis

.github/workflows/quality_control.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,6 @@ jobs:
4343
- name: Install PlatformIO
4444
run: pip install --upgrade platformio
4545
- name: Run Quality Control script
46-
run: cd src/build/scripts && python build.py --build-on-compatible-devices
46+
run: |
47+
cd src/build/scripts
48+
python build.py --build-on-compatible-devices

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json",
33
"name": "CRSFforArduino",
4-
"version": "1.1.0-1.0.0",
4+
"version": "1.1.0-2025.8.30",
55
"description": "An Arduino Library for communicating with ExpressLRS and TBS Crossfire receivers.",
66
"keywords": "arduino, remote-control, arduino-library, protocols, rc, radio-control, crsf, expresslrs",
77
"repository":

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=CRSFforArduino
2-
version=1.1.0-1.0.0
2+
version=1.1.0-2025.8.30
33
author=Cassandra Robinson <nicad.heli.flier@gmail.com>
44
maintainer=Cassandra Robinson <nicad.heli.flier@gmail.com>
55
sentence=CRSF for Arduino brings the Crossfire Protocol to the Arduino ecosystem.

src/CFA_Config.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace crsfForArduinoConfig
3535
Versioning is done using Semantic Versioning 2.0.0.
3636
See https://semver.org/ for more information. */
3737
#define CRSFFORARDUINO_VERSION "1.1.0"
38-
#define CRSFFORARDUINO_VERSION_DATE "2024-7-21"
38+
#define CRSFFORARDUINO_VERSION_DATE "2025-08-30"
3939
#define CRSFFORARDUINO_VERSION_MAJOR 1
4040
#define CRSFFORARDUINO_VERSION_MINOR 1
4141
#define CRSFFORARDUINO_VERSION_PATCH 0
@@ -46,11 +46,11 @@ See https://semver.org/ for more information. */
4646
// These are the pre-release version details which are only used if CRSFFORARDUINO_VERSION_IS_PRERELEASE is set to 1.
4747
// NOTE: Pre-release versions are not recommended for production use.
4848
#if CRSFFORARDUINO_VERSION_IS_PRERELEASE == 1
49-
#define CRSFFORARDUINO_VERSION_PRE "1.0.0"
50-
#define CRSFFORARDUINO_VERSION_BUILD_DATE "2024-7-21"
51-
#define CRSFFORARDUINO_VERSION_BUILD_MAJOR 1
52-
#define CRSFFORARDUINO_VERSION_BUILD_MINOR 0
53-
#define CRSFFORARDUINO_VERSION_BUILD_PATCH 0
49+
#define CRSFFORARDUINO_VERSION_PRE "2025.8.30"
50+
#define CRSFFORARDUINO_VERSION_BUILD_DATE "2025-08-30"
51+
#define CRSFFORARDUINO_VERSION_BUILD_MAJOR 2025
52+
#define CRSFFORARDUINO_VERSION_BUILD_MINOR 8
53+
#define CRSFFORARDUINO_VERSION_BUILD_PATCH 30
5454
#endif
5555

5656
/* Failsafe Options

src/build/scripts/platformio.ini

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,37 @@
99
; https://docs.platformio.org/page/projectconf.html
1010

1111
[platformio]
12-
core_dir = /workspaces/CRSFforArduino/.pio/core
13-
workspace_dir = /workspaces/CRSFforArduino/.pio
12+
core_dir = ../../../.pio/core
13+
workspace_dir = ../../../.pio
1414
default_envs =
1515
; defect_detector
1616
; development
1717
${build.commonly_used}
1818
extra_configs =
19-
/workspaces/CRSFforArduino/src/build/targets/common.ini
20-
/workspaces/CRSFforArduino/src/build/targets/quality_control.ini
21-
/workspaces/CRSFforArduino/src/build/targets/unified_esp32.ini
22-
/workspaces/CRSFforArduino/src/build/targets/unified_rp2040.ini
23-
/workspaces/CRSFforArduino/src/build/targets/unified_samd21.ini
24-
/workspaces/CRSFforArduino/src/build/targets/unified_samd51.ini
25-
/workspaces/CRSFforArduino/src/build/targets/unified_stm32.ini
26-
/workspaces/CRSFforArduino/src/build/targets/unified_teensy3x.ini
27-
/workspaces/CRSFforArduino/src/build/targets/unified_teensy4x.ini
28-
include_dir = /workspaces/CRSFforArduino/src
29-
lib_dir = /workspaces/CRSFforArduino/src
30-
src_dir = /workspaces/CRSFforArduino/src
19+
../../../src/build/targets/common.ini
20+
../../../src/build/targets/quality_control.ini
21+
../../../src/build/targets/unified_esp32.ini
22+
../../../src/build/targets/unified_rp2040.ini
23+
../../../src/build/targets/unified_samd21.ini
24+
../../../src/build/targets/unified_samd51.ini
25+
../../../src/build/targets/unified_stm32.ini
26+
../../../src/build/targets/unified_teensy3x.ini
27+
../../../src/build/targets/unified_teensy4x.ini
28+
include_dir = ../../../src
29+
lib_dir = ../../../src
30+
src_dir = ../../../src
3131
test_dir =
3232

3333
[env:development]
3434
board = adafruit_metro_m4
3535
build_src_filter =
36-
+</workspaces/CRSFforArduino/examples/platformio/main.cpp>
37-
+</workspaces/CRSFforArduino/src/CRSFforArduino.cpp>
38-
+</workspaces/CRSFforArduino/src/hal/CompatibilityTable/CompatibilityTable.cpp>
39-
+</workspaces/CRSFforArduino/src/SerialReceiver/SerialReceiver.cpp>
40-
+</workspaces/CRSFforArduino/src/SerialReceiver/CRC/CRC.cpp>
41-
+</workspaces/CRSFforArduino/src/SerialReceiver/CRSF/CRSF.cpp>
42-
+</workspaces/CRSFforArduino/src/SerialReceiver/SerialBuffer/SerialBuffer.cpp>
43-
+</workspaces/CRSFforArduino/src/SerialReceiver/Telemetry/Telemetry.cpp>
36+
+<../examples/platformio/main.cpp>
37+
+<CRSFforArduino.cpp>
38+
+<hal/CompatibilityTable/CompatibilityTable.cpp>
39+
+<SerialReceiver/SerialReceiver.cpp>
40+
+<SerialReceiver/CRC/CRC.cpp>
41+
+<SerialReceiver/CRSF/CRSF.cpp>
42+
+<SerialReceiver/SerialBuffer/SerialBuffer.cpp>
43+
+<SerialReceiver/Telemetry/Telemetry.cpp>
4444
build_type = debug
4545
extends = env_common_samd51

src/build/targets/common.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ platform = teensy@4.18.0
3737
[env]
3838
framework = arduino
3939
build_src_filter =
40-
+</workspaces/CRSFforArduino/examples/platformio/main.cpp>
41-
+</workspaces/CRSFforArduino/src/CRSFforArduino.cpp>
42-
+</workspaces/CRSFforArduino/src/hal/CompatibilityTable/CompatibilityTable.cpp>
43-
+</workspaces/CRSFforArduino/src/SerialReceiver/SerialReceiver.cpp>
44-
+</workspaces/CRSFforArduino/src/SerialReceiver/CRC/CRC.cpp>
45-
+</workspaces/CRSFforArduino/src/SerialReceiver/CRSF/CRSF.cpp>
46-
+</workspaces/CRSFforArduino/src/SerialReceiver/SerialBuffer/SerialBuffer.cpp>
47-
+</workspaces/CRSFforArduino/src/SerialReceiver/Telemetry/Telemetry.cpp>
40+
+<../examples/platformio/main.cpp>
41+
+<CRSFforArduino.cpp>
42+
+<hal/CompatibilityTable/CompatibilityTable.cpp>
43+
+<SerialReceiver/SerialReceiver.cpp>
44+
+<SerialReceiver/CRC/CRC.cpp>
45+
+<SerialReceiver/CRSF/CRSF.cpp>
46+
+<SerialReceiver/SerialBuffer/SerialBuffer.cpp>
47+
+<SerialReceiver/Telemetry/Telemetry.cpp>
4848
; -<../examples/platformio/cfa_code_test.cpp>
4949
; +<../examples/platformio/main.cpp>
5050
; +<*/*/*.cpp>

src/build/targets/quality_control.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ build_flags =
3131
-DCRSF_LINK_STATISTICS_ENABLED=1
3232

3333
build_src_filter =
34-
+</workspaces/CRSFforArduino/examples/platformio/main.cpp>
35-
+</workspaces/CRSFforArduino/src/CRSFforArduino.cpp>
36-
+</workspaces/CRSFforArduino/src/hal/CompatibilityTable/CompatibilityTable.cpp>
37-
+</workspaces/CRSFforArduino/src/SerialReceiver/SerialReceiver.cpp>
38-
+</workspaces/CRSFforArduino/src/SerialReceiver/CRC/CRC.cpp>
39-
+</workspaces/CRSFforArduino/src/SerialReceiver/CRSF/CRSF.cpp>
40-
+</workspaces/CRSFforArduino/src/SerialReceiver/SerialBuffer/SerialBuffer.cpp>
41-
+</workspaces/CRSFforArduino/src/SerialReceiver/Telemetry/Telemetry.cpp>
34+
+<../examples/platformio/main.cpp>
35+
+<CRSFforArduino.cpp>
36+
+<hal/CompatibilityTable/CompatibilityTable.cpp>
37+
+<SerialReceiver/SerialReceiver.cpp>
38+
+<SerialReceiver/CRC/CRC.cpp>
39+
+<SerialReceiver/CRSF/CRSF.cpp>
40+
+<SerialReceiver/SerialBuffer/SerialBuffer.cpp>
41+
+<SerialReceiver/Telemetry/Telemetry.cpp>
4242
; +<../examples/platformio/main.cpp>
4343
; +<*/*/*.cpp>
4444
; +<*.cpp>

0 commit comments

Comments
 (0)