Skip to content

silence warnings

silence warnings #59

Workflow file for this run

name: Publish
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-rust:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust_target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl, x86_64-pc-windows-gnu, aarch64-unknown-linux-gnu, riscv64gc-unknown-linux-gnu]
os: [ubuntu-latest]
include:
- rust_target: x86_64-apple-darwin
os: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@master
with:
target: ${{ matrix.rust_target }}
toolchain: stable
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.rust_target == 'x86_64-unknown-linux-musl' || matrix.rust_target == 'x86_64-pc-windows-gnu' || matrix.rust_target == 'aarch64-unknown-linux-gnu' || matrix.rust_target == 'riscv64gc-unknown-linux-gnu' }}
command: build
args: --locked --profile ci-build --manifest-path=cli/Cargo.toml --target=${{ matrix.rust_target }}
- name: Copy binary
if: matrix.rust_target != 'x86_64-pc-windows-gnu'
run: |
mkdir output_dir
cp cli/target/${{ matrix.rust_target }}/ci-build/pg2parquet output_dir/
- name: Copy binary
if: matrix.rust_target == 'x86_64-pc-windows-gnu'
run: |
mkdir output_dir
cp cli/target/${{ matrix.rust_target }}/ci-build/pg2parquet.exe output_dir/
- name: Strip binary
if: matrix.rust_target == 'x86_64-unknown-linux-musl'
run: |
strip output_dir/pg2parquet
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: release-${{ matrix.rust_target }}
path: output_dir/pg2parquet${{ matrix.rust_target == 'x86_64-pc-windows-gnu' && '.exe' || '' }}