Skip to content

Commit

Permalink
Re-Enable ci for m0/m4/rp2040/s2/s3 (#14)
Browse files Browse the repository at this point in the history
* try to re-add ci
* enable USE_SPI_ARRAY_TRANSFER and USE_UTF8_LONG_NAMES (if not avr)
* add skip test and slightly update examples for passing ci for all platforms
* add feather s3
* install RTClib for ci
* install SD lib
  • Loading branch information
hathach authored Oct 15, 2022
1 parent d63799c commit 5c0b73a
Show file tree
Hide file tree
Showing 42 changed files with 180 additions and 25 deletions.
92 changes: 92 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Bug Report
description: Report a problem
labels: 'Bug'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
It's okay to leave some blank if it doesn't apply to your problem.
- type: dropdown
attributes:
label: Operating System
options:
- Linux
- MacOS
- RaspberryPi OS
- Windows 7
- Windows 10
- Windows 11
- Others
validations:
required: true

- type: input
attributes:
label: IDE version
placeholder: e.g Arduino 1.8.15
validations:
required: true

- type: input
attributes:
label: Board
placeholder: e.g Feather nRF52840 Express
validations:
required: true

- type: input
attributes:
label: BSP version
description: Can be found under "Board Manager" menu
validations:
required: true

- type: input
attributes:
label: SPIFlash Library version
placeholder: "Release version or github latest"
validations:
required: true

- type: textarea
attributes:
label: Sketch
placeholder: |
e.g examples/flash_info
If it is custom sketch, please provide links to your minimal sources or as attached files.
validations:
required: true

- type: textarea
attributes:
label: What happened ?
placeholder: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
attributes:
label: How to reproduce ?
placeholder: |
1. Go to '...'
2. Click on '....'
3. See error
validations:
required: true

- type: textarea
attributes:
label: Debug Log
placeholder: |
Debug log where the issue occurred as attached txt file, best with comments to explain the actual events.
validations:
required: false

- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
validations:
required: false
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Adafruit Support Forum
url: https://forums.adafruit.com
about: If you have other questions or need help, post it here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
41 changes: 41 additions & 0 deletions .github/workflows/githubci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build

on: [pull_request, push, repository_dispatch]

jobs:
build:
strategy:
fail-fast: false
matrix:
arduino-platform:
- 'feather_esp32s2'
- 'feather_esp32s3'
- 'feather_rp2040'
- 'metro_m0'
- 'metro_m4'
- 'nrf52840'

runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Checkout code
uses: actions/checkout@v3

- name: Checkout adafruit/ci-arduino
uses: actions/checkout@v3
with:
repository: adafruit/ci-arduino
path: ci

- name: pre-install
run: bash ci/actions_install.sh

- name: Install Libraries for building examples
run: arduino-cli lib install RTClib SD

- name: test platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions examples/BufferedPrint/BufferedPrint.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0
#define SD_FAT_TYPE 1
/*
Change the value of SD_CS_PIN if you are using SPI and
your hardware does not use the default value, SS.
Expand Down Expand Up @@ -232,4 +232,4 @@ void setup() {
}
//------------------------------------------------------------------------------
void loop() {
}
}
2 changes: 1 addition & 1 deletion examples/DirectoryFunctions/DirectoryFunctions.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0
#define SD_FAT_TYPE 1
/*
Change the value of SD_CS_PIN if you are using SPI and
your hardware does not use the default value, SS.
Expand Down
4 changes: 2 additions & 2 deletions examples/OpenNext/OpenNext.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0
#define SD_FAT_TYPE 1
/*
Change the value of SD_CS_PIN if you are using SPI and
your hardware does not use the default value, SS.
Expand Down Expand Up @@ -102,4 +102,4 @@ void setup() {
}
}
//------------------------------------------------------------------------------
void loop() {}
void loop() {}
2 changes: 1 addition & 1 deletion examples/ReadCsvFile/ReadCsvFile.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0
#define SD_FAT_TYPE 1
/*
Change the value of SD_CS_PIN if you are using SPI and
your hardware does not use the default value, SS.
Expand Down
4 changes: 2 additions & 2 deletions examples/RtcTimestampTest/RtcTimestampTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0
#define SD_FAT_TYPE 1
/*
Change the value of SD_CS_PIN if you are using SPI and
your hardware does not use the default value, SS.
Expand Down Expand Up @@ -233,4 +233,4 @@ void setup() {
}
//------------------------------------------------------------------------------
void loop() {
}
}
Empty file.
4 changes: 2 additions & 2 deletions examples/SoftwareSpi/SoftwareSpi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0
#define SD_FAT_TYPE 1
//
// Chip select may be constant or RAM variable.
const uint8_t SD_CS_PIN = 10;
Expand Down Expand Up @@ -77,4 +77,4 @@ void setup() {
void loop() {}
#else // SPI_DRIVER_SELECT
#error SPI_DRIVER_SELECT must be two in SdFat/SdFatConfig.h
#endif //SPI_DRIVER_SELECT
#endif //SPI_DRIVER_SELECT
Empty file.
Empty file.
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions examples/UnicodeFilenames/UnicodeFilenames.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const char* names[] = {u8"россиянин", u8"très élégant", u8"狗.txt",

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0
#define SD_FAT_TYPE 1

// SDCARD_SS_PIN is defined for the built-in SD on some boards.
#ifndef SDCARD_SS_PIN
Expand Down Expand Up @@ -95,4 +95,4 @@ void loop() {
}
#else // USE_UTF8_LONG_NAMES
#error USE_UTF8_LONG_NAMES must be non-zero in SdFat/src/SdFatCongfig.h
#endif // USE_UTF8_LONG_NAMES
#endif // USE_UTF8_LONG_NAMES
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion examples/bench/bench.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0
#define SD_FAT_TYPE 1
/*
Change the value of SD_CS_PIN if you are using SPI and
your hardware does not use the default value, SS.
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions examples/examplesV1/#attic/benchSD/benchSD.ino
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void loop() {
}

// fill buf with known data
for (size_t_t i = 0; i < (BUF_SIZE-2); i++) {
for (size_t i = 0; i < (BUF_SIZE-2); i++) {
buf[i] = 'A' + (i % 26);
}
buf[BUF_SIZE-2] = '\r';
Expand Down Expand Up @@ -146,4 +146,4 @@ void loop() {
Serial.print(F(" usec\n\n"));
Serial.print(F("Done\n\n"));
file.close();
}
}
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions examples/rename/rename.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0
#define SD_FAT_TYPE 1

/*
Change the value of SD_CS_PIN if you are using SPI and
Expand Down Expand Up @@ -143,4 +143,4 @@ void setup() {

cout << F("Done") << endl;
}
void loop() {}
void loop() {}
14 changes: 6 additions & 8 deletions src/SdFatConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@
#endif // __AVR__

//------------- Adafruit configuration -------------//
#ifndef SDFAT_FILE_TYPE
#define SDFAT_FILE_TYPE 1
#endif

#ifndef USE_BLOCK_DEVICE_INTERFACE
#define USE_BLOCK_DEVICE_INTERFACE 1
#endif

#ifndef FAT12_SUPPORT
#define FAT12_SUPPORT 1
#define SDFAT_FILE_TYPE 1
#define USE_SPI_ARRAY_TRANSFER 1

// This option will take around 2K of flash, skip for AVR
#ifndef __AVR__
#define USE_UTF8_LONG_NAMES 1
#endif

// Backward-compatible define
Expand Down

0 comments on commit 5c0b73a

Please sign in to comment.