Skip to content

Commit

Permalink
Script to prepare binary executables for uploading to the github rele…
Browse files Browse the repository at this point in the history
…ase page. (#6015)
  • Loading branch information
Unisay authored May 17, 2024
1 parent 802cf4f commit 5ee2936
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
16 changes: 4 additions & 12 deletions RELEASE.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,11 @@ This updates versions and version bounds, and assembles the changelogs.open a PR
- Choose as git tag `x.y.z.0`
- Choose as target the git commit hash which points to the release commit
- Click `Generate release notes` to automatically fill in the details of what's changed
- Create and attach pir&uplc executables to the release by running the following commands inside the repository where its HEAD is at the release commit:
-
+
[source,bash]
-------------
nix build .#hydraJobs.x86_64-linux.musl64.ghc96.pir
cp ./result/bin/pir ./pir-x86_64-linux-ghc96
nix build .#hydraJobs.x86_64-linux.musl64.ghc96.uplc
cp ./result/bin/uplc ./uplc-x86_64-linux-ghc96
-------------
- Create and attach pir&uplc executables to the release by running the following script inside the repository where its HEAD is at the release commit: `./scripts/prepare-bins.sh`. This will create `pir-x86_64-linux-ghc96` and `uplc-x86_64-linux-ghc96` executables, compress them and put in the project's root folder. Upload them to the release draft.
- Click `Publish release`.
7. Open a PR in the https://github.com/IntersectMBO/cardano-haskell-packages[CHaP repository] for publishing the new version. Run `./scripts/add-from-github.sh "https://github.com/IntersectMBO/plutus" COMMIT-SHA LIST-OF-UPDATED-PACKAGES` (see https://github.com/IntersectMBO/cardano-haskell-packages#-from-github[the README on CHaP]). Example: https://github.com/IntersectMBO/cardano-haskell-packages/pull/394.
7. Open a PR in the https://github.com/IntersectMBO/cardano-haskell-packages[CHaP repository] for publishing the new version. +
If you are making PR from your own fork then don't forget to sync your fork with the upstream first. +
Run `./scripts/add-from-github.sh "https://github.com/IntersectMBO/plutus" COMMIT-SHA LIST-OF-UPDATED-PACKAGES` (see https://github.com/IntersectMBO/cardano-haskell-packages#-from-github[the README on CHaP]). Example: https://github.com/IntersectMBO/cardano-haskell-packages/pull/764.
- If issues are found, create a release branch `release/x.y.z`, fix the issues on master, backport the fixes to `release/x.y.z`, tag `x.y.z.0-rc2`, and go to step 4.
- Why not just fix the issues on master and tag `x.y.z.0-rc2` from master?
It is desirable to minimize the amount of change between `rc1` and `rc2`, because it may reduce the tests and checks that need to be performed against `rc2`.
Expand Down
31 changes: 31 additions & 0 deletions scripts/prepare-bins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p bash git nix upx

set -euo pipefail

banner='\n
Lets prepare binaries for a release:\n
1. Build `pir`\n
2. Compress `pir` with `upx`\n
3. Build `uplc`\n
4. Compress `uplc` with `upx`\n
'

echo -e $banner

echo "Building pir..."

nix build ".#hydraJobs.x86_64-linux.musl64.ghc96.pir"

echo "Compressing pir..."

upx -9 ./result/bin/pir -o pir-x86_64-linux-ghc96 --force-overwrite

echo "Building uplc..."

nix build ".#hydraJobs.x86_64-linux.musl64.ghc96.uplc"

echo "Compressing uplc..."

upx -9 ./result/bin/uplc -o uplc-x86_64-linux-ghc96 --force-overwrite

1 comment on commit 5ee2936

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Plutus Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: 5ee2936 Previous: 802cf4f Ratio
validation-decode-escrow-redeem_2-1 337.2 μs 313.3 μs 1.08
validation-decode-escrow-redeem_2-3 326.7 μs 310.5 μs 1.05
validation-decode-escrow-refund-1 333.1 μs 312.1 μs 1.07
validation-decode-future-increase-margin-2 338.5 μs 318.7 μs 1.06
validation-decode-future-pay-out-2 338.6 μs 317.9 μs 1.07
validation-decode-future-pay-out-3 331.2 μs 315.2 μs 1.05
validation-decode-uniswap-6 189.3 μs 174.4 μs 1.09

This comment was automatically generated by workflow using github-action-benchmark.

CC: @input-output-hk/plutus-core

Please sign in to comment.