Skip to content

Commit

Permalink
More workflow fixes and remove redundant tests
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <[email protected]>
  • Loading branch information
t1m0thyj committed Dec 26, 2024
1 parent 94d6f23 commit d2a4fcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/zowe-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,17 @@ jobs:

- name: Build Binary
id: build-binary
if: matrix.os != 'windows-latest' && 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 }} zowe
- name: Build Binary (Windows)
id: build-windows-binary
if: matrix.os == 'windows-latest' && github.event.inputs.test-type != 'nodejs'
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 }} zowe.exe
env:
RUSTFLAGS: "-Ctarget-feature=+crt-static"
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@v4
# 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-${{ matrix.os }}.tgz
path: zowe.tgz
Expand All @@ -115,11 +108,6 @@ jobs:
tar -xvzf zowe.tgz -C ./__tests__/__resources__/daemon_instances
echo "${{ github.workspace }}/__tests__/__resources__/application_instances" >> $GITHUB_PATH
- name: Test Rust EXE and zowe script
id: test-exe-and-script
if: ${{ steps.setup-binary.outcome == 'success' && github.event.inputs.test-type != 'nodejs' }}
run: cargo test ${{ github.event.inputs.binary-type == 'release' && '--release' || '' }} --manifest-path=zowex/Cargo.toml -- --nocapture

- name: Unit Tests
if: ${{ always() && steps.build.outcome == 'success' }}
run: npm run test:unit
Expand Down
2 changes: 2 additions & 0 deletions zowex/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.'cfg(all(windows, target_env = "msvc"))']
rustflags = ["-Ctarget-feature=+crt-static"]

0 comments on commit d2a4fcd

Please sign in to comment.