Skip to content

chore(zowex): bump rust-version to 1.88 #14171

chore(zowex): bump rust-version to 1.88

chore(zowex): bump rust-version to 1.88 #14171

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Zowe CLI
on:
push:
pull_request:
workflow_dispatch:
inputs:
binary-type:
type: choice
description: Specify whether to use a `debug` or a `release` version of the binary
default: debug
options:
- debug
- release
test-type:
type: choice
description: Specify whether to run tests using the `binary` or regular `nodejs` executable
default: binary
options:
- binary
- nodejs
macos-type:
type: choice
description: Run against x86-based MacOS, otherwise run against ARM64-based MacOS
default: macos-15
options:
- macos-15-intel
- macos-15
jobs:
test:
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [20.9.0, 20.x, 22.x, 24.x]
os:
- windows-latest
- ubuntu-22.04
- ${{ github.event.inputs.macos-type || 'macos-15'}}
env:
OS: ${{ matrix.os }}
NODE: ${{ matrix.node-version }}
NODE_OPTIONS: --max_old_space_size=4096
PACKAGE_CLI: ${{ matrix.os == 'ubuntu-22.04' && matrix.node-version == '22.x' }}
permissions:
contents: read
pull-requests: write
timeout-minutes: 90
concurrency:
group: ${{ matrix.os }}-node-${{ matrix.node-version }}-ci-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Disable Lint Annotations
run: |
echo "::remove-matcher owner=eslint-compact::"
echo "::remove-matcher owner=eslint-stylish::"
- name: Install Dependencies
run: npm ci
- name: Install Rust toolchain
id: install-rust
if: github.event.inputs.test-type != 'nodejs'
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
- name: Build Source
id: build
run: npm run build
- name: Build Binary
id: build-binary
if: github.event.inputs.test-type != 'nodejs'
run: |
cargo build --verbose ${{ github.event.inputs.binary-type == 'release' && '--release' || '' }} --manifest-path=zowex/Cargo.toml
tar -cvzf zowe.tgz -C zowex/target/${{ github.event.inputs.binary-type || 'debug' }} ${{ matrix.os == 'windows-latest' && 'zowe.exe' || 'zowe' }}
- name: Archive Binary
if: github.event.inputs.test-type != 'nodejs'
id: upload-binary
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
# Ignore conflict if multiple jobs upload artifact at same time: https://github.com/actions/upload-artifact/issues/506
continue-on-error: true
with:
name: zowe-${{ runner.os }}.tgz
path: zowe.tgz
overwrite: true
- name: Setup Binary in PATH
if: github.event.inputs.test-type != 'nodejs'
id: setup-binary
shell: bash
run: |
tar -xvzf zowe.tgz -C ./__tests__/__resources__/daemon_instances
echo "${{ github.workspace }}/__tests__/__resources__/application_instances" >> $GITHUB_PATH
- name: Unit Tests
if: ${{ always() && steps.build.outcome == 'success' }}
run: npm run test:unit
- name: Unlock Keyring
id: unlock-keyring
if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-22.04' }}
uses: t1m0thyj/unlock-keyring@cbcf205c879ebd86add70bab3a6abfcce59a5cae # v1
- name: Start Daemon
id: start-daemon
if: ${{ always() && steps.build.outcome == 'success' && github.event.inputs.test-type != 'nodejs' }}
run: ./__tests__/__resources__/daemon_instances/zowe
- name: Integration Tests (Native)
if: ${{ always() && steps.build.outcome == 'success' && github.event.inputs.test-type == 'nodejs' }}
run: npm run test:integration
- name: Integration Tests (Daemon)
if: ${{ always() && steps.build.outcome == 'success' && github.event.inputs.test-type != 'nodejs' }}
run: npm run test:integration -- --runInBand
- name: Archive Results
if: ${{ always() && steps.build.outcome == 'success' }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ runner.os }}-${{ matrix.node-version }}-results
path: __tests__/__results__/
- name: Upload Results to Codecov
if: ${{ always() && steps.build.outcome == 'success' }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
env_vars: OS,NODE
token: ${{ secrets.CODECOV_TOKEN }}
- name: Package CLI
id: package
if: ${{ always() && steps.build.outcome == 'success' && env.PACKAGE_CLI == 'true' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run package
- name: Archive CLI Package
id: cli-artifact-upload
if: ${{ always() && steps.package.outcome == 'success' }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: zowe-cli
path: packages/cli/zowe-cli-*.tgz
# This job runs on "push" rather than "pull_request" for branches in this repo, so the PR must be looked up
- name: Find PR for Branch
id: find-pr
if: ${{ always() && github.event_name == 'push' && steps.cli-artifact-upload.outcome == 'success' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "number=$(gh pr list --head '${{ github.ref_name }}' --state open --json number --jq '.[0].number // empty')" >> $GITHUB_OUTPUT
- name: Comment on PR
if: ${{ always() && steps.find-pr.outputs.number != '' }}
uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v2
with:
header: Client artifacts
number: ${{ steps.find-pr.outputs.number }}
message: |
Client artifacts:
- CLI: ${{ steps.cli-artifact-upload.outputs.artifact-url }}
release:
if: github.event_name == 'push' && github.ref_protected
needs: test
runs-on: ubuntu-22.04
permissions:
issues: write
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ github.ref }}
# Use Node 20. Currently the latest.
- name: Use Node.js 20
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20'
- name: Install Dependencies
run: npm ci
- name: Build Source
run: npm run build
- uses: zowe-actions/octorelease@e0672bf28f74f36219713afe75915ea2dc7bf85b # v1
env:
GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }}
GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }}
GIT_CREDENTIALS: x-access-token:${{ secrets.ZOWE_ROBOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
NPM_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
NPM_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }}