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

Replace ad hoc build system #6

Merged
merged 6 commits into from
Aug 14, 2024
Merged

Conversation

apljungquist
Copy link
Contributor

This is modelled after the corresponding changes in acap-rs and the
motivation is largely the same; in summary it makes it easier to share
improvements since we don't need to patch Makefiles that may have
diverged, and allows more sophisticated integration with Cargo such as
getting the name of test binaries build or using build scripts to
prepare additional files dynamically.

Enumerate workflows in readme

This gives potential users a preview of what is available without
downloading or installing anything.

@apljungquist apljungquist requested a review from a team as a code owner May 27, 2024 12:42
README.md Outdated Show resolved Hide resolved
@apljungquist apljungquist marked this pull request as draft June 11, 2024 06:38
@apljungquist apljungquist force-pushed the replace_ad_hoc_build_system branch 2 times, most recently from 569c65c to 122ce64 Compare June 11, 2024 10:57
apljungquist and others added 3 commits June 11, 2024 12:57
This is modelled after the corresponding changes in `acap-rs` and the
motivation is largely the same; in summary it makes it easier to share
improvements since we don't need to patch `Makefile`s that may have
diverged, and allows more sophisticated integration with Cargo such as
getting the name of test binaries build or using build scripts to
prepare additional files dynamically.

Enumerate workflows in readme

This gives potential users a preview of what is available without
downloading or installing anything.
* Remove wget dependency

Since curl is already installed, wget is unnecessary.

* Use regular (non-slim) debian as base, to include man pages, etc.

* Install cargo-acap-sdk in Dockerfile

* Use --no-docker with cargo-acap-sdk

* Merge install_rust.sh into Dockerfile, skip adding unnecessary write permissions

* Add devcontainer.json, move Dockerfile into .devcontainer

* Install rust-analyzer extension in vscode devcontainers

* Add devcontainers configuration to dependabot.yml

* Add GitHub CLI as a devcontainer feature
@apljungquist apljungquist marked this pull request as ready for review June 19, 2024 17:59
@apljungquist apljungquist marked this pull request as draft June 19, 2024 18:00
…d_system

* upstream/main:
  chore(deps): bump log from 0.4.21 to 0.4.22 in the default group (#20)
  chore(deps): bump ghcr.io/devcontainers/features/common-utils (#21)
  Source app-logging from crates.io (#19)
  chore: Specify exact version of `cross` (#18)
  Add dev container (#16)
@apljungquist apljungquist marked this pull request as ready for review August 14, 2024 09:38
In general files have been copied or updated from acap-rs commit
5148b09e77e321a215a18f2f4ab75ec64839265c; if a decision is not
explained here it may be explained in the history of acap-rs.

`.devcontainer/Dockerfile`:
- Inline shell scripts because when copied from a windows host they
  sometimes fail depending on how git is configured to handle line
  endings.
- Install development tools from acap-rs earlier because we can and
  when `rust-toolchain.toml` has been removed cargo complains that no
  version is selected.

`.github/workflows/CI.yml`:
- Run tests using devcontainer to make sure that the recommended
  workflow is working.

`Makefile`:
- Replace default goal since the `help` goal does not exist and as
  long as `mkhelp` is a python package I don't intend to add it back.
- Skip the bulk operations because this template is set up for
  developing a single app/package.

`README.md`:
- Remove documentation of development environments other than the dev
  container because the template is meant to get started quickly and
  committed or experienced users should be able to set up their own
  project with this template and acap-rs as inspiration. These
  environment setups are documented in acap-rs anyway. At some point
  running `cargo-acap-sdk` on host may become supported, but not before
  containerized builds a `cargo-acap` and `cross` is added to it.
- Add help outputs from various tools to give users a preview of what
  to expect if they do use the template and to spread awareness of
  these tools.
- Remove the troubleshooting section since this problem should not
  happen now that shell scripts have been inlined in the `Dockerfile`.

`src/main.rs`:
- Add a simple test so that `make test` does something interesting out
  of the box.
@apljungquist apljungquist merged commit f0c85de into main Aug 14, 2024
1 check passed
@apljungquist apljungquist deleted the replace_ad_hoc_build_system branch August 14, 2024 13:50
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.

2 participants