Skip to content

Conversation

alexandruradovici
Copy link
Contributor

This PR adds a release workflow to generate a bootloader bin and version file and upload them to a github release.

The workflow is manually activated and asks for the bootloader version as a parameter.

I had to use the "development" dependencies as otherwise cargo clones the tock repository recursively (due to qemu) and the workflow throws a network error.

This PR is a followup for #21

@alexandruradovici alexandruradovici force-pushed the microbit_v2_release branch 3 times, most recently from ed2adea to 192d8f8 Compare February 3, 2021 16:23
@alexandruradovici
Copy link
Contributor Author

I rebased this,

@hudson-ayers
Copy link

Unfortunately this still seems to break travis (the current failure seems to be from using wildcard imports, which Tock's style rules forbid).

@alexandruradovici
Copy link
Contributor Author

All the PRs do this, it is not related to the changes in this PR.

@hudson-ayers
Copy link

Oh, sorry. I don't review many PRs in the bootloader repo!

@bradjc
Copy link
Contributor

bradjc commented Feb 9, 2021

This is cool! Can you revert the changes the the cargo files?

@alexandruradovici
Copy link
Contributor Author

This is cool! Can you revert the changes the the cargo files?

If I use the git repository, the workflow stops due to some error when downloading qemu. I have the same problem when building it locally.

@hudson-ayers
Copy link

That should be fixed once tock/tock#2323 is merged. Sorry about that.

@alexandruradovici
Copy link
Contributor Author

Done.

@alexandruradovici
Copy link
Contributor Author

I changes the branch in Cargo.toml to remove-submodule, the workflow works now.

@bradjc
Copy link
Contributor

bradjc commented Feb 15, 2021

Now that tock/tock#2323 is merged I think we can update the cargo.toml files for the last time and get this merged!

@alexandruradovici
Copy link
Contributor Author

alexandruradovici commented Feb 17, 2021

It works now with master, the workflow is updated

@bradjc bradjc merged commit d07821e into tock:master Feb 17, 2021
cd boards/microbit_v2-bootloader
export BOOTLOADER_VERSION="${{ github.event.inputs.version }}"
export BOOTLOADER_HASH="$(git rev-parse HEAD)"
export BOOTLOADER_KERNEL_HASH="$(cat Cargo.lock | grep https://github.com/tock/tock?branch=remove-submodule | uniq | cut -d '#' -f 2 | cut -d '"' -f 1)"

Choose a reason for hiding this comment

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

Shouldn't this be master now?

echo "Version: ${{ github.event.inputs.version }}" > tock-bootloader.microbit_v2.version
echo "Toolchain: $(rustc --version)" >> tock-bootloader.microbit_v2.version
echo "Tock Bootloader Hash: $(git rev-parse HEAD)" >> tock-bootloader.microbit_v2.version
echo Tock Hash: $(cat boards/microbit_v2-bootloader/Cargo.lock | grep https://github.com/tock/tock?branch=remove-submodule | uniq | cut -d '#' -f 2 | cut -d '"' -f 1) >> tock-bootloader.microbit_v2.version

Choose a reason for hiding this comment

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

same here, not sure how this checking out remove-submodule interacts with the Cargo.lock file using a commit on master

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.

3 participants