From 94b090215af6719c9472926179720314de9990dc Mon Sep 17 00:00:00 2001 From: Alexey-Sagaydak Date: Sun, 28 Apr 2024 01:22:18 +0700 Subject: [PATCH] add client and server artifacts creation --- .github/workflows/ci.yaml | 15 ++++++++++++++- create_debpkg_client.sh | 17 +++++++++++++++++ create_debpkg_server.sh | 17 +++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 create_debpkg_client.sh create mode 100644 create_debpkg_server.sh diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 55f795f..69a3fe7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,4 +10,17 @@ jobs: - run: sudo apt-get update - run: sudo apt-get install g++ make cmake - run: sudo apt-get install -y libboost-all-dev - - run: cd client && mkdir -p build && cd build && cmake .. && make && cd ../../server && mkdir -p build && cd build && cmake .. && make \ No newline at end of file + - run: cd client && mkdir -p build && cd build && cmake .. && make && cd ../../server && mkdir -p build && cd build && cmake .. && make + - run: cd ../.. + - run: sh create_debpkg_client.sh + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: client + path: ./http-client.deb + - run: sh create_debpkg_server.sh + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: server + path: ./http-server.deb \ No newline at end of file diff --git a/create_debpkg_client.sh b/create_debpkg_client.sh new file mode 100644 index 0000000..5585adc --- /dev/null +++ b/create_debpkg_client.sh @@ -0,0 +1,17 @@ +cd client/ +mkdir -p ./deb_pakage +mkdir -p ./deb_pakage/bin +mkdir -p ./deb_pakage/DEBIAN +touch ./deb_pakage/DEBIAN/control + +cat << EOF > ./deb_pakage/DEBIAN/control +Package: http-client +Version: 1.0 +Architecture: amd64 +Maintainer: alexey-sagaidak +Description: http client for DCSA labs +EOF + +cp ./build/libhv-client ./deb_pakage/bin/ + +dpkg-deb --build ./deb_pakage/ http-client.deb \ No newline at end of file diff --git a/create_debpkg_server.sh b/create_debpkg_server.sh new file mode 100644 index 0000000..fa0d46f --- /dev/null +++ b/create_debpkg_server.sh @@ -0,0 +1,17 @@ +cd server/ +mkdir -p ./deb_pakage +mkdir -p ./deb_pakage/bin +mkdir -p ./deb_pakage/DEBIAN +touch ./deb_pakage/DEBIAN/control + +cat << EOF > ./deb_pakage/DEBIAN/control +Package: http-server +Version: 1.0 +Architecture: amd64 +Maintainer: alexey-sagaidak +Description: http server for DCSA labs +EOF + +cp ./build/libhv-http ./deb_pakage/bin/ + +dpkg-deb --build ./deb_pakage/ http-server.deb \ No newline at end of file