Skip to content

Library not included, when source-path: points to private repo #167

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

Closed
3 tasks done
aliphys opened this issue Aug 31, 2023 · 3 comments
Closed
3 tasks done

Library not included, when source-path: points to private repo #167

aliphys opened this issue Aug 31, 2023 · 3 comments
Assignees
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@aliphys
Copy link

aliphys commented Aug 31, 2023

Describe the problem

I want to check that the examples in library A compile correctly prior to public release. However, library A is dependant upon library B. Both libraries are private.

The compile-sketches-private.yml workflow works for library B, but not library A.

To reproduce

  1. Create two private repos. Let's call them LibA and LibB. LibB has no external dependancies, outside what is inside the library manager. LibA however is dependant upon LibB (i.e. has #include "LibB" in the example sketches)
  2. Copy the compile-sketches-private.yml workflow to the .github/workflows folder in each repo. Configure the fqbn: and add libraies from the library manager (e.g. libraries: - name: Servo)
  3. Inside the compile-sketches-private.yml for LibA, refer to LibB as follows:
 libraries: |
            # Install the library from the local path.
            - source-path: ./
            - source-path: https://github.com/arduino-libraries/LibB
  1. When running the workflow, I get a message stating the following:
Error: Library source path: https:/github.com/arduino-libraries/LibB doesn't exist
Error: Process completed with exit code 1.

Expected behavior

Private libraries to which my account (or the organisation hosting it) have access to should be acceptable entries to source-path:

'arduino/compile-sketches' version

per1234/.github@b7b3433

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@aliphys
Copy link
Author

aliphys commented Sep 5, 2023

In this issue, I requested that the Expected behaviour should be: Private libraries to which my account (or the organisation hosting it) have access to should be acceptable entries to source-path:

However, source-path: can only be used for location relative to the current repository location. The correct syntax (as pointed out by @sebromero ) is source-url:

This is also stated in the documentation.

compile-sketches/README.md

Lines 100 to 116 in e841385

##### Local path
Keys:
- **`source-path`** - (**required**) path to install as a platform. Relative paths are assumed to be relative to the root of the repository.
- **`name`** - (**required**) platform name in the form of `VENDOR:ARCHITECTURE` (e.g., `arduino:avr`).
##### Repository
Keys:
- **`source-url`** - (**required**) URL to clone the repository from. It must start with `git://` or end with `.git`.
- **`name`** - (**required**) platform name in the form of `VENDOR:ARCHITECTURE` (e.g., `arduino:avr`).
- **`version`** - [Git ref](https://git-scm.com/book/en/v2/Git-Internals-Git-References) of the repository to checkout. The special version name `latest` will cause the latest tag to be used.
- **Default**: the repository is checked out to the tip of the default branch.
- **`source-path`** - path to install as a platform. Paths are relative to the root of the repository.
- **Default**: root of the repository.

Closing issue, as not relavent

@aliphys aliphys closed this as completed Sep 5, 2023
@aliphys
Copy link
Author

aliphys commented Sep 5, 2023

@per1234
Copy link
Collaborator

per1234 commented Sep 5, 2023

Thanks for your report @aliphys.

The correct syntax (as pointed out by @sebromero ) is source-url:

This is true, but even with that error fixed in the workflow:

libraries: |
  - source-url: https://github.com/arduino-libraries/LibB.git

the installation of the dependency would still fail if arduino-libraries/LibB is a private repository. Installation of dependencies from private repositories is supported by the action using the standard capabilities of Git, GitHub, and GitHub Actions, but the necessary configuration is fairly complex so I think it would be useful to provide some guidance about that. I have submitted a PR to add this information to the documentation: #174

Since you have a valuable perspective on this subject as someone who was recently attempting to use the action in the targeted use case, I would appreciate it if you would review that PR.

@per1234 per1234 added the topic: code Related to content of the project itself label Sep 5, 2023
@per1234 per1234 changed the title [AE-158] Library not included, when source-path: points to private repo Library not included, when source-path: points to private repo Oct 23, 2023
@per1234 per1234 added the conclusion: invalid Issue/PR not valid label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants