-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR in a variety of release-oriented changes in preparation for delivering testing artifacts and moving towards more formal releases. ## Added - Extracted `myceli` config values into config file with reasonable defaults. - CI based docker builds and binary releases. - Basic general testing plan in `testing/testing-plan.md`. - Added basic for for building/running `myceli` in Docker. ## Changed - Updated docs/readme to reflect new `myceli` configuration file.
- Loading branch information
Showing
21 changed files
with
393 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
start_release: | ||
name: build_release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Create release | ||
uses: actions/create-release@v1 | ||
id: create_release | ||
with: | ||
draft: true | ||
prerelease: false | ||
release_name: ${{ github.ref_name }} | ||
tag_name: ${{ github.ref }} | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
build_upload_artifacts: | ||
needs: [start_release] | ||
name: build_upload_artifacts | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: | ||
[ | ||
armv7-unknown-linux-gnueabihf, | ||
aarch64-unknown-linux-gnu, | ||
x86_64-unknown-linux-gnu, | ||
] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: install cross | ||
run: cargo install cross --git https://github.com/cross-rs/cross | ||
- name: clean cargo | ||
run: cargo clean | ||
- name: myceli build | ||
run: CROSS_CONFIG=Cross.toml cross build --bin myceli --target ${{ matrix.target }} --release | ||
- name: upload myceli binary | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ needs.start_release.outputs.upload_url }} | ||
asset_path: ./target/${{ matrix.target }}/release/myceli | ||
asset_name: myceli-${{ matrix.target }} | ||
asset_content_type: application | ||
build_upload_docker: | ||
needs: [start_release] | ||
name: build_upload_docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Login to Github Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and publish myceli docker | ||
run: | | ||
docker build -f myceli.Dockerfile . --tag ghcr.io/ipfs-shipyard/myceli:latest | ||
docker build -f myceli.Dockerfile . --tag ghcr.io/ipfs-shipyard/myceli:${{ github.ref_name }} | ||
docker push ghcr.io/ipfs-shipyard/myceli:latest | ||
docker push ghcr.io/ipfs-shipyard/myceli:${{ github.ref_name }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[target.armv7-unknown-linux-gnueabihf] | ||
dockerfile = "cross-armv7-linux.Dockerfile" | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
dockerfile = "cross-aarch64-linux.Dockerfile" | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
dockerfile = "cross-x86-linux.Dockerfile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[target.armv7-unknown-linux-gnueabihf] | ||
dockerfile = "../Dockerfile" | ||
dockerfile = "../cross.Dockerfile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:latest | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y unzip | ||
|
||
RUN curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip" | ||
RUN unzip -q protoc.zip -d /usr/local | ||
RUN chmod a+x /usr/local/bin/protoc | ||
ENV PROTOC=/usr/local/bin/protoc |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM ghcr.io/cross-rs/x86_64-unknown-linux-gnu:latest | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y unzip | ||
|
||
RUN curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip" | ||
RUN unzip -q protoc.zip -d /usr/local | ||
RUN chmod a+x /usr/local/bin/protoc | ||
ENV PROTOC=/usr/local/bin/protoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Build and running Myceli in Docker | ||
|
||
This doc contains instructions on how to build and run `myceli` in Docker | ||
|
||
### Building | ||
|
||
The file `myceli.Dockerfile` contains all the instructions needed by Docker to produce an image for running `myceli`. This image can be built by running the following command: | ||
|
||
$ docker build -f myceli.Dockerfile . -t myceli | ||
|
||
### Pulling | ||
|
||
The `myceli` docker images are published to the Github Container registry and can be pulled with the following command: | ||
|
||
$ docker pull ghcr.io/ipfs-shipyard/myceli:latest | ||
|
||
### Running | ||
|
||
We only suggest running `myceli` in Docker in Linux environments due to networking requirements. | ||
|
||
Example running of `myceli` in a standalone Docker container with default settings: | ||
|
||
$ docker run --rm -v `pwd`:/myceli/ --network host -it ghcr.io/ipfs-shipyard/myceli:latest | ||
|
||
Important pieces to point out here: | ||
|
||
- `-v pwd:/myceli/`: Mounting a local directory is necessary for `myceli`'s storage to persist | ||
- `--network host`: The container running `myceli` needs to either run on the host network, or on the same network as the other services which will be communicating with it (controller CLI, ground radio bridge). | ||
|
||
Optionally you may want to pass a config file argument in with the `CONFIG_PATH` environment variable, like this: | ||
|
||
$ docker run --rm -v `pwd`:/myceli/ --network host -e CONFIG_PATH=/myceli/config.toml -it ghcr.io/ipfs-shipyard/myceli:latest |
Oops, something went wrong.