More logging and assertions in build.rs high integrity download. (#92) #61
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: Apache-2.0 | |
name: Publish to crates.io | |
on: | |
push: | |
tags: | |
- 'v*' # This will trigger the workflow on version tags like v1.0.0, v0.1.0, etc. | |
jobs: | |
publish: | |
runs-on: macos-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Validate version matches | |
run: | | |
# GITHUB_REF will be something like "refs/tags/v0.0.57" | |
# We'll strip off the "refs/tags/" part, leaving "v0.0.57". | |
VERSION="${GITHUB_REF#refs/tags/}" | |
# Now invoke the Python script, passing the version. | |
python check_version_is.py "$VERSION" | |
- name: Install protobuf compiler | |
run: | | |
wget https://github.com/protocolbuffers/protobuf/releases/download/v29.1/protoc-29.1-osx-aarch_64.zip | |
unzip protoc-29.1-osx-aarch_64.zip -d protoc | |
sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
sudo mv protoc /tmp/ # Move these out of the way to not interfere with build. | |
sudo mv protoc-*.zip /tmp/ # Move these out of the way to not interfere with build. | |
# Emit the protobuf compiler version number. | |
protoc --version | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Cache Cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-registry- | |
- name: Cache Cargo index | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/git | |
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-index- | |
- name: Build and test | |
run: cargo test --workspace --verbose | |
- name: Publish xlsynth-sys to crates.io | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
run: | | |
cd xlsynth-sys | |
cargo publish --token $CARGO_REGISTRY_TOKEN | |
- name: Wait for crates.io to update | |
run: sleep 20 | |
- name: Publish xlsynth | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
run: | | |
cd xlsynth | |
cargo publish --token $CARGO_REGISTRY_TOKEN | |
- name: Wait for crates.io to update | |
run: sleep 20 | |
- name: Publish xlsynth-driver | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
run: | | |
cd xlsynth-driver | |
cargo publish --token $CARGO_REGISTRY_TOKEN |