Skip to content

Commit

Permalink
add workflow dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Jul 28, 2024
1 parent 3753348 commit cbd9fd1
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/test-java-bindings-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ on:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
inputs:
ref:
description: 'The reference (branch/tag/commit) to checkout'
required: false
release-type:
type: choice
required: false
default: 'none'
description: 'Indicates whether we want to make a release and if which one'
options:
- release
- none

env:
CARGO_TERM_COLOR: always
Expand All @@ -27,7 +40,9 @@ jobs:
- target: x86_64-pc-windows-gnu
os: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -47,7 +62,6 @@ jobs:
chmod +x .github/scripts/compile_all_targets_java_new.sh
.github/scripts/compile_all_targets_java_new.sh ${{ matrix.target }}
shell: bash

- name: Upload dynamic libs
uses: actions/upload-artifact@v3
with:
Expand All @@ -72,13 +86,14 @@ jobs:
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: ${{ matrix.target }}
path: bindings/java/java_code/src/main/resources/${{ matrix.target }}

- name: Set up JDK
uses: actions/setup-java@v3
with:
Expand All @@ -95,13 +110,14 @@ jobs:
name: Merge Artifacts
needs: [build, test]
runs-on: ubuntu-latest
if: ${{ inputs.release-type != 'none' }}
steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: bindings/java/java_code/src/main/resources

- name: List merged artifacts
run: ls -R bindings/java/java_code

0 comments on commit cbd9fd1

Please sign in to comment.