Skip to content

Commit

Permalink
fix: set ubuntu image in cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
mgattozzi committed Mar 11, 2024
1 parent 234ca36 commit 581482e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ jobs:
run: |
cargo dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
echo "cargo dist ran successfully"
# Hack around the fact that cargo-dist can't let us choose the runner
# version yet. We need this for protoc, but it's set to 20.04 to link
# against an old glibc for compatibility
sed -i 's/ubuntu-20.04/ubuntu-latest/' plan-dist-manifest.json
cat plan-dist-manifest.json
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
- name: "Upload dist-manifest.json"
Expand Down Expand Up @@ -156,7 +152,7 @@ jobs:
needs:
- plan
- build-local-artifacts
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
Expand Down Expand Up @@ -203,7 +199,7 @@ jobs:
if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
outputs:
val: ${{ steps.host.outputs.manifest }}
steps:
Expand Down Expand Up @@ -238,7 +234,7 @@ jobs:
needs:
- plan
- host
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLAN: ${{ needs.plan.outputs.val }}
Expand Down Expand Up @@ -284,7 +280,7 @@ jobs:
# still allowing individual publish jobs to skip themselves (for prereleases).
# "host" however must run to completion, no skipping allowed!
if: ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') }}
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-
publish-jobs = ["homebrew"]
# Publish jobs to run in CI
pr-run-mode = "upload"
# Workaround for the fact that we need protoc from Ubuntu > 20.04
allow-dirty = ["ci"]

[workspace.metadata.dist.github-custom-runners]
x86_64-unknown-linux-gnu = "ubuntu-latest"
x86_64-unknown-linux-musl = "ubuntu-latest"

[workspace.metadata.dist.dependencies.homebrew]
protobuf = "3.21"
Expand Down

0 comments on commit 581482e

Please sign in to comment.