Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #1

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #1

Workflow file for this run

#
# Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0,
# or the Eclipse Distribution License v. 1.0 which is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#
name: Eclipse OpenMQ CI
on:
pull_request:
jobs:
build:
name: Test on JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java_version: [ 17 ]
steps:
- name: Checkout for build
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
- name: Test Maven Build
run: ./mvnw --show-version --no-transfer-progress --activate-profiles staging --file mq install
- name: Upload MQ Distribution
uses: actions/upload-artifact@v3
with:
name: mq-distribution
retention-days: 1
path: mq/dist/bundles/mq.zip
build-with-no-staging:
name: Build with no staging repository, using only central-released artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout for build
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Build OpenMQ
run: ./mvnw --show-version --no-transfer-progress --file mq --define skipTests install
smoke:
name: Smoke Tests ${{ matrix.mq_command }} @ Java ${{ matrix.java_version }}
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
java_version: [ 11 ]
mq_command: [
'imqadmin',
'imqbridgemgr',
'imqbrokerd',
'imqcmd',
'imqdbmgr',
'imqobjmgr',
'imqusermgr'
]
steps:
- name: Download MQ Distribution
uses: actions/download-artifact@v4.1.7
with:
name: mq-distribution
- name: Unzip MQ Distribution
run: unzip -q mq.zip
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java_version }}
- name: Execute MQ Command
run: mq/bin/${{ matrix.mq_command}} -version
test-mqcrt-client:
name: Test MQCRT Library on ${{ matrix.os }}
needs: smoke
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
steps:
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Checkout for build
uses: actions/checkout@v3
- name: Install required libraries (ubuntu)
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-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
ln mq/binary/linux/opt/obj/cclient/libmqcrt.so.* mq/binary/linux/opt/obj/cclient/libmqcrt.so
- name: Build mqcrt library (macos)
if: ${{ matrix.os == 'macos-latest' }}
run: |
ant -f mq/main/packager-opensource buildcclient
cp mq/binary/mac/opt/obj/cclient/libmqcrt.dylib .
- name: Build Producer and Consumer (ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
for B in Producer Consumer
do
g++ -L mq/binary/linux/opt/obj/cclient \
-I mq/src/share/cclient/cshim \
mq/src/share/cclient/examples/C/producer_consumer/${B}.c \
-o ${B} \
-lmqcrt -lnspr4 -lssl3
done
- name: Build Producer and Consumer (macos)
if: ${{ matrix.os == 'macos-latest' }}
run: |
for B in Producer Consumer
do
c++ -L mq/binary/mac/opt/obj/cclient \
-I mq/src/share/cclient/cshim \
mq/src/share/cclient/examples/C/producer_consumer/${B}.c \
-o ${B} \
-lmqcrt
done
- name: Download MQ Distribution
uses: actions/download-artifact@v4.1.7
with:
name: mq-distribution
- name: Unpack MQ Distribution
run: unzip -q -d mq/dist mq.zip
- name: Start MQ Broker Daemon
timeout-minutes: 2
run: |
nohup mq/dist/mq/bin/imqbrokerd -verbose > brokerd.log 2>&1 &
while [ true ]
do
grep "Broker .*:7676.*ready" brokerd.log && break
sleep 10s
done
- name: Produce message (ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
echo "OpenMQ Test message from workflow" | \
LD_LIBRARY_PATH=mq/binary/linux/opt/obj/cclient ./Producer -t queue
- name: Produce message (macos)
if: ${{ matrix.os == 'macos-latest' }}
run: |
echo "OpenMQ Test message from workflow" | ./Producer -t queue
- name: Consume message (ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
timeout-minutes: 1
run: |
LD_LIBRARY_PATH=mq/binary/linux/opt/obj/cclient ./Consumer -t queue | \
tee consumer.log
- name: Consume message (macos)
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