Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Commit d418dcd

Browse files
authored
Remove dependency on Protobufs, update to cargo-dist 0.6.1 (#171)
2 parents 6bf2210 + 6616681 commit d418dcd

File tree

9 files changed

+35
-332
lines changed

9 files changed

+35
-332
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ jobs:
5959
with:
6060
submodules: recursive
6161
- name: Install cargo-dist
62-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.5.0/cargo-dist-installer.sh | sh"
62+
# we specify bash to get pipefail; it guards against the `curl` command
63+
# failing. otherwise `sh` won't catch that `curl` returned non-0
64+
shell: bash
65+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.6.2/cargo-dist-installer.sh | sh"
6366
# sure would be cool if github gave us proper conditionals...
6467
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
6568
# functionality based on whether this is a pull_request, and whether it's from a fork.
@@ -81,7 +84,8 @@ jobs:
8184
build-local-artifacts:
8285
name: build-local-artifacts (${{ join(matrix.targets, ', ') }})
8386
# Let the initial task tell us to not run (currently very blunt)
84-
needs: plan
87+
needs:
88+
- plan
8589
if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
8690
strategy:
8791
fail-fast: false
@@ -105,10 +109,6 @@ jobs:
105109
with:
106110
submodules: recursive
107111
- uses: swatinem/rust-cache@v2
108-
- name: Install nix
109-
uses: cachix/install-nix-action@v22
110-
with:
111-
nix_path: nixpkgs=channel:nixos-23.05
112112
- name: Install cargo-dist
113113
run: ${{ matrix.install_dist }}
114114
# Get the dist-manifest
@@ -123,7 +123,7 @@ jobs:
123123
- name: Build artifacts
124124
run: |
125125
# Actually do builds and make zips and whatnot
126-
nix-shell --run 'cargo dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json'
126+
cargo dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
127127
echo "cargo dist ran successfully"
128128
- id: cargo-dist
129129
name: Post-build
@@ -154,13 +154,13 @@ jobs:
154154
runs-on: "ubuntu-20.04"
155155
env:
156156
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157-
BUILD_MANIFEST_NAME: target/distrib/dist-manifest.json
157+
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
158158
steps:
159159
- uses: actions/checkout@v4
160160
with:
161161
submodules: recursive
162162
- name: Install cargo-dist
163-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.5.0/cargo-dist-installer.sh | sh"
163+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.6.2/cargo-dist-installer.sh | sh"
164164
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
165165
- name: Fetch local artifacts
166166
uses: actions/download-artifact@v3
@@ -170,7 +170,7 @@ jobs:
170170
- id: cargo-dist
171171
shell: bash
172172
run: |
173-
nix-shell --run 'cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json'
173+
cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
174174
echo "cargo dist ran successfully"
175175
176176
# Parse out what we just built and upload it to scratch storage
@@ -204,7 +204,7 @@ jobs:
204204
with:
205205
submodules: recursive
206206
- name: Install cargo-dist
207-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.5.0/cargo-dist-installer.sh | sh"
207+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.6.2/cargo-dist-installer.sh | sh"
208208
# Fetch artifacts from scratch-storage
209209
- name: Fetch artifacts
210210
uses: actions/download-artifact@v3

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ jobs:
4545
nix-shell --run "cargo fmt --all --check"
4646
4747
- name: Run cargo test
48-
run: |
49-
nix-shell --run "cargo test"
5048
env:
5149
RIVET_API_ENDPOINT: ${{ secrets.RIVET_API_ENDPOINT }}
5250
RIVET_TOKEN: ${{ secrets.RIVET_TOKEN }}
5351
RUST_BACKTRACE: 1
5452
CARGO_PROFILE_TEST_BUILD_OVERRIDE_DEBUG: true
53+
run: |
54+
nix-shell --run "cargo test"
55+

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
- Add `x86_64-unknown-linux-musl` artifact
1213
- Version names are now generated with incrementing indexes on the backend without race conditions
1314
- Warning if running unauthenticated commands as a sudo user
1415
- `sidekick unlink` subcommand to unlink the current project from the
@@ -23,7 +24,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2324
- `sidekick deploy` to do the process of deploying a build to Rivet
2425
- ability for `sidekick` to open terminal in a new window for commands
2526
that need to be shown (e.g. `sidekick deploy`)
26-
- nix to CI as `GlobalError` requires Protobuf
2727
- `sidekick get-version` subcommand to get the manage version URL in the
2828
hub
2929
- `sidekick get-token` subcommand to get a Rivet token for a user
@@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4444
the installation directory, preventing the need for sudo in certain cases
4545
- Rivet CLI now references the `rivet-cli-api` from the Rivet main repo rather
4646
than storing its own copy
47+
- Update `cargo-dist` to 0.6.2
4748

4849
### Fixed
4950

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Install the prerequisites:
66

77
```bash
8-
cargo install cargo-dist@0.5.0
8+
cargo install cargo-dist@0.6.2
99
cargo install cargo-release@0.25.0
1010
```
1111

0 commit comments

Comments
 (0)