File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 3333 distribution : ' temurin'
3434 cache : ' maven'
3535 # - uses: actions-rust-lang/setup-rust-toolchain@v1
36- - run : ./update-rust-jni-libs.sh
36+ - run : ./update-rust-jni-libs.sh -r
3737 if : ${{ matrix.os.image == 'macos-latest' }}
3838
3939 - name : test
Original file line number Diff line number Diff line change 2626# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727#
2828
29+ set -euxo pipefail
2930
31+ # Run Cargo in debug mode by default
32+ CARGO_OPTIONS=" "
33+ TARGET_SUBDIR=" debug"
3034
31- set -euxo pipefail
35+ while getopts " :r" OPTION; do
36+ case $OPTION in
37+ r) # Run Cargo in release mode
38+ CARGO_OPTIONS=" --release"
39+ TARGET_SUBDIR=" release"
40+ esac
41+ done
3242
3343RESOURCES=" ../resources/engineering/swat/watch/jni/"
3444
3545cd src/main/rust
3646
37-
3847function build() {
3948 rustup target add $1
40- cargo build --target $1
49+ cargo build --target $1 $CARGO_OPTIONS
4150 mkdir -p " $RESOURCES /$2 /"
42- cp " target/$1 /debug /librust_fsevents_jni.dylib" " $RESOURCES /$2 /"
51+ cp " target/$1 /$TARGET_SUBDIR /librust_fsevents_jni.dylib" " $RESOURCES /$2 /"
4352}
4453
4554build " x86_64-apple-darwin" " macos-x64"
4655build " aarch64-apple-darwin" " macos-aarch64"
47-
You can’t perform that action at this time.
0 commit comments