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

chore: Rewrite build script in Rust #2706

Merged
merged 26 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ed80fc9
Rewrite build script in Rust
adamspofford-dfinity Oct 21, 2022
eb79e10
remove pointless copy
adamspofford-dfinity Oct 21, 2022
81ec9ca
Add windows to build matrix
adamspofford-dfinity Oct 21, 2022
3a66e48
Merge remote-tracking branch 'origin/master' into spofford/build.rs
adamspofford-dfinity Oct 21, 2022
3f2185f
post merge
adamspofford-dfinity Oct 21, 2022
e31babc
Update prepare-dfx-assets.yml
adamspofford-dfinity Oct 21, 2022
130f3e2
Update frontend canister for Cargo.lock change
adamspofford-dfinity Oct 21, 2022
47db1b7
annoying
adamspofford-dfinity Oct 21, 2022
0c0ea27
facepalm
adamspofford-dfinity Oct 21, 2022
795d427
I don't think these are supposed to be named differently
adamspofford-dfinity Oct 21, 2022
606cd8b
restore underscore
adamspofford-dfinity Oct 21, 2022
7c765ac
Update the other references
adamspofford-dfinity Oct 21, 2022
145b729
Delete prepare-dfx-assets.sh
adamspofford-dfinity Oct 21, 2022
0f28cf5
Update dfx-asset-sources.toml
adamspofford-dfinity Oct 21, 2022
77ba1d5
Update shellcheck.yml
adamspofford-dfinity Oct 21, 2022
2e39a82
Delete prepare-dfx-assets.sh from `INPUTS`
adamspofford-dfinity Oct 21, 2022
cf7dc55
Add request timeout
adamspofford-dfinity Oct 21, 2022
543c42b
artefact of an earlier design
adamspofford-dfinity Oct 24, 2022
16cb6e0
Merge branch 'master' into spofford/build.rs
adamspofford-dfinity Oct 24, 2022
a044663
Merge branch 'master' into spofford/build.rs
adamspofford-dfinity Oct 24, 2022
3ee095e
revert itertools version
adamspofford-dfinity Oct 24, 2022
c32a336
remove mode change for clean changelist
adamspofford-dfinity Oct 24, 2022
a11f7d4
Merge branch 'master' into spofford/build.rs
mergify[bot] Oct 24, 2022
5fefaf0
Merge branch 'master' into spofford/build.rs
adamspofford-dfinity Oct 24, 2022
dd4878f
use worse compression
adamspofford-dfinity Oct 25, 2022
f9fcb8a
Merge branch 'master' into spofford/build.rs
adamspofford-dfinity Oct 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
rust: [ '1.60.0' ]
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-latest, macos-latest, windows-latest ]

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/prepare-dfx-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
!target/*/build/dfx-*/out/dfx-assets
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup component add clippy
rustup default ${{ matrix.rust }}

- name: Prepare dfx assets
run: scripts/prepare-dfx-assets.sh "$(mktemp -d)"
- name: Run build script
run: |
cargo check

aggregate:
name: prepare-dfx-assets:required
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ jobs:
run: $HOME/bin/shellcheck-v0.7.1/shellcheck e2e/**/*.*sh
- name: Check release script
run: $HOME/bin/shellcheck-v0.7.1/shellcheck scripts/release.sh
- name: Check asset prep script
run: $HOME/bin/shellcheck-v0.7.1/shellcheck scripts/prepare-dfx-assets.sh

6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ lto = true
[profile.dev.package.argon2]
opt-level = 3

[profile.dev.package.miniz_oxide]
opt-level = 3

[profile.release.package.ic-frontend-canister]
opt-level = 'z'

16 changes: 8 additions & 8 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
"url": "https://github.com/RustSec/advisory-db/archive/fe7b79e8ebf9ad03660e573e0c2a1ed4e80dee5d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"canister-sandbox-x86_64-darwin": {
"canister_sandbox-x86_64-darwin": {
"builtin": false,
"description": "The canister-sandbox binary. It must be updated together with the replica binary.",
"description": "The canister_sandbox binary. It must be updated together with the replica binary.",
"rev": "3e1be1316341811db5c9300935c4236bfab8fa2a",
"sha256": "07d5jf6y6a7kl3s4pgmjs7xsr93cvn6lp56gyr7zxziab81wp1i3",
"type": "file",
"url": "https://download.dfinity.systems/blessed/ic/3e1be1316341811db5c9300935c4236bfab8fa2a/sdk-release/x86_64-darwin/canister_sandbox.gz",
"url_template": "https://download.dfinity.systems/blessed/ic/<rev>/sdk-release/x86_64-darwin/canister_sandbox.gz"
},
"canister-sandbox-x86_64-linux": {
"canister_sandbox-x86_64-linux": {
"builtin": false,
"description": "The canister-sandbox binary. It must be updated together with the replica binary.",
"description": "The canister_sandbox binary. It must be updated together with the replica binary.",
"rev": "3e1be1316341811db5c9300935c4236bfab8fa2a",
"sha256": "1vyxwlvh59irx0j4rbjdyrj2j7hhhnc1c5552yc0pbmip9xalzkr",
"type": "file",
Expand Down Expand Up @@ -178,7 +178,7 @@
},
"replica-x86_64-darwin": {
"builtin": false,
"description": "The replica binary. It must be updated together with the canister-sandbox binary.",
"description": "The replica binary. It must be updated together with the canister_sandbox binary.",
"rev": "3e1be1316341811db5c9300935c4236bfab8fa2a",
"sha256": "06mvsa9ibj3waj600digpgnipj74lc020lgvvamzzvpqpvwh6hag",
"type": "file",
Expand All @@ -187,14 +187,14 @@
},
"replica-x86_64-linux": {
"builtin": false,
"description": "The replica binary. It must be updated together with the canister-sandbox binary.",
"description": "The replica binary. It must be updated together with the canister_sandbox binary.",
"rev": "3e1be1316341811db5c9300935c4236bfab8fa2a",
"sha256": "1c71c3zzljdjgbgx85qgijf75ccqv9vm083sidycnrh8m1lrzh27",
"type": "file",
"url": "https://download.dfinity.systems/blessed/ic/3e1be1316341811db5c9300935c4236bfab8fa2a/sdk-release/x86_64-linux/replica.gz",
"url_template": "https://download.dfinity.systems/blessed/ic/<rev>/sdk-release/x86_64-linux/replica.gz"
},
"sandbox-launcher-x86_64-darwin": {
"sandbox_launcher-x86_64-darwin": {
"builtin": false,
"description": "The sandbox_launcher binary. It must be updated together with the replica binary.",
"rev": "3e1be1316341811db5c9300935c4236bfab8fa2a",
Expand All @@ -203,7 +203,7 @@
"url": "https://download.dfinity.systems/blessed/ic/3e1be1316341811db5c9300935c4236bfab8fa2a/sdk-release/x86_64-darwin/sandbox_launcher.gz",
"url_template": "https://download.dfinity.systems/blessed/ic/<rev>/sdk-release/x86_64-darwin/sandbox_launcher.gz"
},
"sandbox-launcher-x86_64-linux": {
"sandbox_launcher-x86_64-linux": {
"builtin": false,
"description": "The sandbox_launcher binary. It must be updated together with the replica binary.",
"rev": "3e1be1316341811db5c9300935c4236bfab8fa2a",
Expand Down
54 changes: 0 additions & 54 deletions scripts/dfx-asset-sources.sh

This file was deleted.

161 changes: 0 additions & 161 deletions scripts/prepare-dfx-assets.sh

This file was deleted.

8 changes: 4 additions & 4 deletions scripts/update-replica.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ niv update ic-starter-x86_64-darwin -a rev=$SHA
niv update ic-starter-x86_64-linux -a rev=$SHA
niv update replica-x86_64-darwin -a rev=$SHA
niv update replica-x86_64-linux -a rev=$SHA
niv update canister-sandbox-x86_64-darwin -a rev=$SHA
niv update canister-sandbox-x86_64-linux -a rev=$SHA
niv update sandbox-launcher-x86_64-darwin -a rev=$SHA
niv update sandbox-launcher-x86_64-linux -a rev=$SHA
niv update canister_sandbox-x86_64-darwin -a rev=$SHA
niv update canister_sandbox-x86_64-linux -a rev=$SHA
niv update sandbox_launcher-x86_64-darwin -a rev=$SHA
niv update sandbox_launcher-x86_64-linux -a rev=$SHA
niv update sns-x86_64-darwin -a rev=$SHA
niv update sns-x86_64-linux -a rev=$SHA

Expand Down
Loading