Commit 767ea4c6 authored by Sjoerd Crooijmans's avatar Sjoerd Crooijmans
Browse files

Merge branch 'create-package-in-ci' into 'master'

Create package in CI

See merge request clean-and-itasks/contrib/mqttclient!5
parents cb309f2a 51f38092
Pipeline #46228 passed with stages
in 2 minutes and 27 seconds
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- compile
- package
default:
image: "camilstaps/clean:nightly"
before_script:
- install_clean_nightly.sh bundle-complete
- apt-get update
- apt-get install -yqq build-essential autoconf libtool
- ( cd cdeps/wolfMQTT; ./autogen.sh; ./configure --enable-mqtt5 --disable-tls; make install; )
compile:
image: "camilstaps/clean:nightly"
before_script:
- install_clean_nightly.sh bundle-complete
- apt-get update
- apt-get install -yqq build-essential autoconf libtool
- ( cd cdeps/wolfMQTT; ./autogen.sh; ./configure --enable-mqtt5 --disable-tls; make install; )
stage: compile
script:
- make
package:
only:
- master
stage: package
script:
- make buildLib
- tar czf MQTTClient-linux-x64.tar.gz src --transform s/src/MQTTClient/
artifacts:
paths:
- ./*.tar.gz
......@@ -3,5 +3,4 @@
## Installation instructions
1. Install [WolfMQTT](https://github.com/wolfSSL/wolfMQTT) (optionally with --enable-mqtt5 flag)
2. Use the adapted iTask-sdk
3. Build and run the project
\ No newline at end of file
2. Run the `make` command
\ No newline at end of file
......@@ -313,6 +313,8 @@ int mqtt_disconnect(MqttClient* mqttClient)
while (msg != NULL) {
Msg* tmp = msg;
msg = msg->next;
free(msg->topic_buf);
free(msg->payload_buf);
free(tmp);
}
free(ctx);
......
CLEAN_HOME?=/opt/clean
.SECONDARY: MQTTClient.prj
.PHONY: clean
all: MQTTClient
......@@ -11,3 +12,8 @@ all: MQTTClient
%: %.prj
cpm project $^ build
clean:
rm -rf Clean\ System\ Files
rm -rf MQTTClient-www
rm -f MQTTClient *.bc *.pbc *.prj
\ No newline at end of file
CLEANHEADER = ${CLEAN_HOME}/lib/Directory/Clean\ System\ Files
CFLAGS?=-Wall -Wextra -Wno-unused-parameter
.PHONY: clean
all: buildLib buildDemo
buildLib:
......@@ -9,4 +11,7 @@ buildLib:
buildDemo:
make -C demo
clean:
rm -rf $(addsuffix /Clean\ System\ Files, src src/MQTT)
make -C demo clean
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment