fix result struct binding (#559) #74
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
name: Release | |
on: | |
push: | |
tags: | |
- '*' | |
branches: # TODO: Remove before merging. | |
- fix-ci # Pushing the feature branch should test this PR. | |
jobs: | |
build: | |
name: Build for ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
name: linux64 | |
artifact_name: target/x86_64-unknown-linux-musl/release/didc | |
asset_name: didc-linux64 | |
- os: macos-12 | |
name: macos | |
artifact_name: target/release/didc | |
asset_name: didc-macos | |
- os: ubuntu-latest | |
name: arm | |
artifact_name: target/arm-unknown-linux-gnueabihf/release/didc | |
asset_name: didc-arm32 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
if: matrix.name != 'arm' | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install stable toolchain | |
if: matrix.name == 'arm' | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
target: arm-unknown-linux-gnueabihf | |
- name: Build | |
if: matrix.name == 'linux64' | |
run: | | |
set -x | |
sudo apt-get update -yy | |
sudo apt-get install -yy musl musl-dev musl-tools | |
rustup target add x86_64-unknown-linux-musl | |
cargo build --release --locked --target x86_64-unknown-linux-musl | |
- name: Build | |
if: matrix.name == 'macos' | |
run: cargo build --release --locked | |
- name: Cross build | |
if: matrix.name == 'arm' | |
uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --target arm-unknown-linux-gnueabihf --release --locked | |
- name: 'Upload assets' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.asset_name }} | |
path: ${{ matrix.artifact_name }} | |
retention-days: 3 | |
test: | |
needs: build | |
name: Test for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
asset_name: didc-linux64 | |
- os: ubuntu-20.04 | |
asset_name: didc-linux64 | |
- os: macos-13 | |
asset_name: didc-macos | |
- os: macos-12 | |
asset_name: didc-macos | |
- os: macos-11 | |
asset_name: didc-macos | |
steps: | |
- name: Get executable | |
id: download | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ matrix.asset_name }} | |
- name: Executable runs | |
run: | | |
chmod +x didc | |
./didc --version | |
publish: | |
needs: test | |
name: Publish ${{ matrix.asset_name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- asset_name: didc-linux64 | |
- asset_name: didc-arm32 | |
- asset_name: didc-macos | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get executable | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ matrix.asset_name }} | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: didc | |
asset_name: ${{ matrix.asset_name }} | |
tag: ${{ github.ref }} |