Skip to content

Produce completions for complgen itself in CI #7

Produce completions for complgen itself in CI

Produce completions for complgen itself in CI #7

Workflow file for this run

name: Release
on:
push:
branches: testci
tags:
- test
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release-x86_64-linux-binaries:
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Configure build cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build the binaries
uses: addnab/docker-run-action@v3
with:
image: registry.gitlab.com/rust_musl_docker/image:stable-latest
options: -v ${{ github.workspace }}:/workdir -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
run: |
rustup target add x86_64-unknown-linux-musl
cargo build --release --target=x86_64-unknown-linux-musl
cp target/x86_64-unknown-linux-musl/release/complgen complgen-x86_64-unknown-linux-musl
- run: |
./complgen-x86_64-unknown-linux-musl compile --bash-script complgen.bash --fish-script complgen.fish --zsh-script complgen.zsh usage/complgen.usage
mkdir -p staging
cp complgen.{bash,fish,zsh} staging/
cp complgen-x86_64-unknown-linux-musl staging/
tar czf complgen-x86_64-unknown-linux-musl.tar.gz "staging"
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
complgen-x86_64-unknown-linux-musl.tar.gz
release-arm-linux-binaries:
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Configure build cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build the binaries
uses: addnab/docker-run-action@v3
with:
image: messense/rust-musl-cross:aarch64-musl
options: -v ${{ github.workspace }}:/home/rust/src -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
run: |
rustup target add aarch64-unknown-linux-musl
cargo build --release
cp target/aarch64-unknown-linux-musl/release/complgen complgen-aarch64-unknown-linux-musl
- run: |
./complgen-aarch64-unknown-linux-musl compile --bash-script complgen.bash --fish-script complgen.fish --zsh-script complgen.zsh usage/complgen.usage
mkdir -p staging
cp complgen.{bash,fish,zsh} staging/
cp complgen-aarch64-unknown-linux-musl staging/
tar czf complgen-aarch64-unknown-linux-musl.tar.gz "staging"
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
complgen-aarch64-unknown-linux-musl.tar.gz
release-macos-binaries:
runs-on: macos-11
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
- uses: actions/checkout@v2
- name: Configure build cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: ${{ matrix.target }}
- name: Build the release binaries
run: |
cargo build --release --target ${{ matrix.target }}
cp target/${{ matrix.target }}/release/complgen complgen-${{ matrix.target }}
- run: |
./complgen-${{ matrix.target }} compile --bash-script complgen.bash --fish-script complgen.fish --zsh-script complgen.zsh usage/complgen.usage
mkdir -p staging
cp complgen.{bash,fish,zsh} staging/
cp complgen-${{ matrix.target }} staging/
tar czf complgen-${{ matrix.target }}.tar.gz "staging"
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
complgen-${{ matrix.target }}.tar.gz