Skip to content

Merge branch 'master' into feat/keytar-rs #618

Merge branch 'master' into feat/keytar-rs

Merge branch 'master' into feat/keytar-rs #618

Workflow file for this run

name: Rust CLI CI
on:
push:
branches-ignore:
- "master"
- "next"
paths:
- "zowex/**"
- '.github/workflows/rust-cli*.yml'
pull_request:
paths: "zowex/**"
jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]')
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Prepare Cross
run: cargo install cross@0.2.5
# Need to build in container with old version of GLIBC to support RHEL 7
# https://kobzol.github.io/rust/ci/2021/05/07/building-rust-binaries-in-ci-that-work-with-older-glibc.html
- name: Build
working-directory: zowex
run: cross build --verbose
- name: Create Archive
run: |
cd zowex/target/x86_64-unknown-linux-gnu/debug
tar -cvzf zowe.tgz zowe
- name: Archive Results
id: upload
uses: actions/upload-artifact@v3
with:
name: zowe-linux.tgz
path: zowex/target/x86_64-unknown-linux-gnu/debug/zowe.tgz
- name: Run linter
run: |
cargo clippy --manifest-path=zowex/Cargo.toml
- name: Run tests
run: cargo test unit --verbose --manifest-path=zowex/Cargo.toml -- --nocapture
build-macos:
name: Build MacOS
runs-on: macos-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]')
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose --manifest-path=zowex/Cargo.toml
- name: Create Archive
run: |
cd zowex/target/debug
gtar -cvzf zowe.tgz zowe
- name: Archive Results
id: upload
uses: actions/upload-artifact@v3
with:
name: zowe-macos.tgz
path: zowex/target/debug/zowe.tgz
- name: Run tests
run: cargo test unit --verbose --manifest-path=zowex/Cargo.toml -- --nocapture
build-windows:
name: Build Windows
runs-on: windows-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]')
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose --manifest-path=zowex/Cargo.toml
env:
RUSTFLAGS: "-Ctarget-feature=+crt-static"
- name: Create Archive
run: |
cd zowex/target/debug
tar -cvzf zowe.tgz zowe.exe
- name: Archive Results
id: upload
uses: actions/upload-artifact@v3
with:
name: zowe-windows.tgz
path: zowex/target/debug/zowe.tgz
- name: Run tests
run: cargo test unit --verbose --manifest-path=zowex/Cargo.toml -- --nocapture