chore; set toyboxC version to 0.0.0 #7
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
name: CI Builds | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- 'crates/**' | |
- '.github/workflows/**' | |
# pull_request: | |
# branches: ["main"] | |
# paths: | |
# - 'crates/**' | |
# - '.github/workflows/**' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
package: | |
strategy: | |
matrix: | |
include: | |
- { name: windows, os: windows-latest, cross-target: "" } | |
name: Package plugin binaries | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch all git history | |
run: git fetch --force --prune --tags --unshallow | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ matrix.cross-target }} | |
- name: Set up Rust toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{ matrix.cross-target }} | |
- name: Package all targets from bundler.toml | |
# Instead of hardcoding which targets to build and package, we'll | |
# package everything that's got en entry in the `bundler.toml` file | |
run: | | |
# Building can be sped up by specifying all packages in one go | |
package_args=() | |
for package in $(cargo xtask known-packages); do | |
package_args+=("-p" "$package") | |
done | |
runner_name=${{ matrix.name }} | |
if [[ $runner_name = 'macos-universal' ]]; then | |
export MACOSX_DEPLOYMENT_TARGET=10.13 | |
cargo xtask bundle-universal "${package_args[@]}" --release | |
else | |
cross_target=${{ matrix.cross-target }} | |
if [[ -n $cross_target ]]; then | |
package_args+=("--target" "$cross_target") | |
fi | |
cargo xtask bundle "${package_args[@]}" --release | |
fi |