Skip to content
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

add CI to build, check fmt and use in example app #6

Merged
merged 1 commit into from
Sep 25, 2020
Merged

Conversation

Lotterleben
Copy link

opening as PR to check if the CI runs actually run.

still missing: app-template stuff

closes #5 once it's done

@Lotterleben Lotterleben marked this pull request as ready for review September 22, 2020 14:02
@Lotterleben Lotterleben changed the title [WIP] add basic CI add CI to build, check fmt and use in example app Sep 22, 2020
@Lotterleben Lotterleben removed the request for review from japaric September 22, 2020 14:09
@Lotterleben Lotterleben marked this pull request as draft September 22, 2020 14:09
@Lotterleben
Copy link
Author

ugh, forgot about my own todos, sorry

@Lotterleben Lotterleben marked this pull request as ready for review September 22, 2020 21:07
@Lotterleben Lotterleben requested review from japaric and jonas-schievink and removed request for japaric September 24, 2020 11:39
Copy link
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I left a few suggestions but those can be done as follow-up PRs. Feel free to merge this PR after rebasing (if you wish to do that).

run: |
sudo apt-get update && sudo apt-get install libssl-dev
rustup target add ${{ env.CORE_TARGET }}
cargo install cargo-generate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can take a while to compile (and maybe annoying to compile on Windows). I think it may be cheaper to git clone the app-template and then use sed or similar to update placeholders like {crate_name}.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aaah good point. we could just do this with a second patch. Pr #2 in 3..2..1.. :)

.github/workflows/ci.yml Outdated Show resolved Hide resolved
#- nightly
os:
- ubuntu-latest
# FIXME: Reenable macOS, Windows, and nightly once demt-test is open-sourced.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flip-link is public so we can enable windows and mac right away

.github/workflows/ci.yml Outdated Show resolved Hide resolved
run: |
cargo generate --git https://github.com/knurling-rs/app-template --branch main --name ${{ env.APPNAME }}
cd ${{ env.APPNAME }}
git apply ../.github/workflows/0001-configure-test-flip-link-app-for-nrf52840.patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was originally thinking of committing an initialized app-template instead of generating a new one on each CI. I think this approach (fetch a new one on each run) is better (at least as long as the app has git dependencies) because we'll get an error (the CI will fail) if the patch stops applying. Perhaps we should also set up a cron job to run CI on a daily basis to catch changes in app-template

@Lotterleben
Copy link
Author

merging; unresolved comments from @japaric have been transferred to #7

@Lotterleben Lotterleben merged commit ef3102f into main Sep 25, 2020
@Lotterleben Lotterleben deleted the add-ci branch September 25, 2020 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add CI
2 participants