Skip to content

Commit

Permalink
Switch macos back to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
pzygielo committed Apr 25, 2024
1 parent edc28a7 commit 0c7ee1d
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:

strategy:
matrix:
os: [ ubuntu-latest, macos-12 ]
os: [ ubuntu-latest, macos-latest ]
java_version: [ 17, 21 ]

steps:
Expand All @@ -120,17 +120,20 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y libnspr4-dev libnss3-dev
- name: Install required libraries (macos)
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.os == 'macos-latest' }}
run: brew update && brew install nspr nss
- name: Build mqcrt library (ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
ant -f mq/main/packager-opensource buildcclient -Dbuild.debug=true
ln mq/binary/linux/debug/obj/cclient/libmqcrt.so.* mq/binary/linux/debug/obj/cclient/libmqcrt.so
- name: Build mqcrt library (macos)
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.os == 'macos-latest' }}
run: |
ant -f mq/main/packager-opensource buildcclient
ant -f mq/main/packager-opensource buildcclient \
-Dnsprhome.opt.mac=/opt/homebrew \
-Dnsshome.opt.mac=/opt/homebrew \
-Dmqcrt.linkdirs.opt.mac=-L/opt/homebrew/lib
cp mq/binary/mac/opt/obj/cclient/libmqcrt.dylib .
- name: Build Producer and Consumer (ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand All @@ -144,7 +147,7 @@ jobs:
-lmqcrt -lnspr4 -lssl3
done
- name: Build Producer and Consumer (macos)
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.os == 'macos-latest' }}
run: |
for B in Producer Consumer
do
Expand All @@ -171,7 +174,7 @@ jobs:
sleep 10s
done
- name: Start MQ Broker Daemon (macos)
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.os == 'macos-latest' }}
timeout-minutes: 2
run: |
nohup mq/dist/mq/bin/imqbrokerd -verbose > brokerd.log 2>&1 &
Expand All @@ -186,7 +189,7 @@ jobs:
echo "OpenMQ Test message from workflow" | \
LD_LIBRARY_PATH=mq/binary/linux/debug/obj/cclient ./Producer -t queue
- name: Produce message (macos)
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.os == 'macos-latest' }}
run: |
echo "OpenMQ Test message from workflow" | ./Producer -t queue
- name: Consume message (ubuntu)
Expand All @@ -196,10 +199,15 @@ jobs:
LD_LIBRARY_PATH=mq/binary/linux/debug/obj/cclient ./Consumer -t queue | \
tee consumer.log
- name: Consume message (macos)
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.os == 'macos-latest' }}
timeout-minutes: 1
run: |
./Consumer -t queue | tee consumer.log
- name: Verify consumed message
run: grep "OpenMQ Test message from workflow" consumer.log

- name: Upload logs on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-mqcrt-client-brokerd-log-${{ matrix.java_version }}-${{ matrix.os }}
path: brokerd.log

0 comments on commit 0c7ee1d

Please sign in to comment.