Skip to content

Move built-in examples to dedicated repository #10734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ build/linux/*.tar.bz2
build/linux/*.zip
build/linux/libastylej*
build/linux/liblistSerials*
build/shared/arduino-examples*
build/shared/reference*.zip
build/shared/Edison*.zip
build/shared/Galileo*.zip
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Thanks for your interest in contributing to this free open source project! Ardui
| [Language Reference](https://www.arduino.cc/reference) | [Reference repositories](https://github.com/arduino?q=reference-) |
| Arduino Forum | [arduino/forum-issues](https://github.com/arduino/forum-issues/issues) |
| Arduino libraries | [arduino-libraries](https://github.com/arduino-libraries) |
| Built-in examples | [arduino/arduino-examples](https://github.com/arduino/arduino-examples/issues) |
| arduino-builder | [arduino/arduino-builder](https://github.com/arduino/arduino-builder/issues) |
| [Arduino Web Editor](https://create.arduino.cc/editor) | [**Create > Editor** section of the Arduino Forum](http://forum.arduino.cc/index.php?board=101.0) |
| Arduino AVR Boards (Uno, Mega, Leonardo, etc.) | [arduino/ArduinoCore-avr](https://github.com/arduino/ArduinoCore-avr/issues) |
Expand Down Expand Up @@ -60,7 +61,6 @@ Pull requests are an easy and effective way to submit a proposal for a change to
- Search [existing pull requests](https://github.com/arduino/Arduino/pulls?q=) to see if one has already been submitted for this change. Search the [issues](https://github.com/arduino/Arduino/issues?q=is%3Aissue) to see if there has been a discussion on this topic and whether your pull request can close any issues.
- Code formatting should be consistent with the style used in the existing code.
- Don't leave commented out code. A record of this code is already preserved in the commit history.
- Note that the Arduino core libraries support many boards and processors. When fixing or adding functionality for one of them, it's easy to break something on the others. Please test your changes on as many processors as possible. Even if you don't have a particular board, try compiling your patch for it to make sure that you haven't introduced any errors.
- All commits must be atomic. This means that the commit completely accomplishes a single task. Each commit should result in fully functional code. Multiple tasks should not be combined in a single commit, but a single task should not be split over multiple commits (e.g. one commit per file modified is not a good practice). For more information see http://www.freshconsulting.com/atomic-commits.
- Each pull request should address a single bug fix or enhancement. This may consist of multiple commits. If you have multiple, unrelated fixes or enhancements to contribute, submit them as separate pull requests.
- Commit messages:
Expand Down
2 changes: 1 addition & 1 deletion app/test/processing/app/CommandLineTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public Process runArduino(boolean output, boolean success, File wd, String[] ext

@Test
public void testCommandLineBuildWithRelativePath() throws Exception {
File wd = new File(buildPath, "build/shared/examples/01.Basics/Blink/");
File wd = new File(buildPath, "app/testdata/sketches/Blink/");
runArduino(true, true, wd, new String[] {
"--board", "arduino:avr:uno",
"--verify", "Blink.ino",
Expand Down
1 change: 1 addition & 0 deletions build/arduino-examples-1.9.0.zip.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22e2a43d7a4eea5f99998a397b0094f505806642
28 changes: 24 additions & 4 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
<property name="AVRDUDE-VERSION" value="6.3.0-arduino17" />
<property name="AVRCORE-VERSION" value="1.8.3" />
<property name="arduinoOTA-VERSION" value="1.3.0" />
<!-- https://github.com/arduino/built-in-examples -->
<property name="BUILT-IN-EXAMPLES-VERSION" value="1.9.0" />

<!-- Libraries required for running arduino -->
<fileset dir=".." id="runtime.jars">
Expand Down Expand Up @@ -209,10 +211,7 @@

<antcall target="assemble-hardware" />

<!-- copy shared examples folder -->
<copy todir="${target.path}/examples">
<fileset dir="shared/examples" />
</copy>
<antcall target="assemble-examples" />

<mkdir dir="${target.path}/reference"/>

Expand All @@ -232,6 +231,27 @@
</antcall>
</target>

<target name="assemble-examples">
<!-- Add the built-in example sketches -->
<property name="BUILT-IN-EXAMPLES-REPOSITORY-OWNER" value="arduino" />
<property name="BUILT-IN-EXAMPLES-REPOSITORY-NAME" value="arduino-examples" />
<property name="BUILT-IN-EXAMPLES-STAGING-PATH" value="shared" />
<property name="BUILT-IN-EXAMPLES-FINAL-PATH" value="${target.path}/examples" />

<!-- Download built-in examples from repository -->
<antcall target="unzip">
<param name="archive_file" value="${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}.zip" />
<param name="archive_url" value="https://github.com/${BUILT-IN-EXAMPLES-REPOSITORY-OWNER}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}/archive/${BUILT-IN-EXAMPLES-VERSION}.zip" />
<param name="final_folder" value="${BUILT-IN-EXAMPLES-FINAL-PATH}" />
<param name="dest_folder" value="${BUILT-IN-EXAMPLES-STAGING-PATH}" />
</antcall>

<!-- Copy examples from subfolder of the downloaded repository -->
<copy todir="${BUILT-IN-EXAMPLES-FINAL-PATH}">
<fileset dir="${BUILT-IN-EXAMPLES-STAGING-PATH}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}/examples" />
</copy>
</target>

<target name="assemble-docs" unless="no_docs">
<!-- Unzip documentation -->
<antcall target="unzip">
Expand Down

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
9 changes: 0 additions & 9 deletions build/shared/examples/01.Basics/BareMinimum/BareMinimum.ino

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion build/shared/examples/01.Basics/Blink/Blink.txt

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
40 changes: 0 additions & 40 deletions build/shared/examples/01.Basics/Fade/Fade.ino

This file was deleted.

1 change: 0 additions & 1 deletion build/shared/examples/01.Basics/Fade/Fade.txt

This file was deleted.

Binary file removed build/shared/examples/01.Basics/Fade/layout.png
Binary file not shown.
Binary file removed build/shared/examples/01.Basics/Fade/schematic.png
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
51 changes: 0 additions & 51 deletions build/shared/examples/02.Digital/Button/Button.ino

This file was deleted.

1 change: 0 additions & 1 deletion build/shared/examples/02.Digital/Button/Button.txt

This file was deleted.

Binary file removed build/shared/examples/02.Digital/Button/layout.png
Binary file not shown.
Binary file not shown.
Loading