mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
Script fixes for building locally with circleci
This commit is contained in:
parent
3eee2471a8
commit
8e72d1ba09
@ -10,8 +10,8 @@ jobs:
|
||||
- run: cmake -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=bionic -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
|
||||
- run: make -j2
|
||||
- run: make package
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/project/*.deb
|
||||
- run: mkdir -p /root/debs && mv /root/project/*.deb /root/debs/
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/debs
|
||||
- store_artifacts:
|
||||
path: /root/debs/
|
||||
build_ubuntu_focal:
|
||||
@ -24,8 +24,8 @@ jobs:
|
||||
- run: cmake -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=focal -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
|
||||
- run: make -j2
|
||||
- run: make package
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/project/*.deb
|
||||
- run: mkdir -p /root/debs && mv /root/project/*.deb /root/debs/
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/debs
|
||||
- store_artifacts:
|
||||
path: /root/debs/
|
||||
build_ubuntu_groovy:
|
||||
@ -38,8 +38,8 @@ jobs:
|
||||
- run: cmake -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=groovy -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
|
||||
- run: make -j2
|
||||
- run: make package
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/project/*.deb
|
||||
- run: mkdir -p /root/debs && mv /root/project/*.deb /root/debs/
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/debs
|
||||
- store_artifacts:
|
||||
path: /root/debs/
|
||||
build_fedora_31:
|
||||
@ -51,8 +51,8 @@ jobs:
|
||||
- run: dnf builddep -y musikcube.spec
|
||||
- run: mkdir -p /root/rpmbuild/SOURCES && spectool -g -R musikcube.spec
|
||||
- run: rpmbuild -ba -vv musikcube.spec
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/rpmbuild/RPMS/x86_64/*.rpm
|
||||
- run: mkdir -p /root/rpms && mv /root/rpmbuild/RPMS/x86_64/*.rpm /root/rpms/
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/rpms
|
||||
- store_artifacts:
|
||||
path: /root/rpms/
|
||||
build_fedora_32:
|
||||
@ -64,8 +64,8 @@ jobs:
|
||||
- run: dnf builddep -y musikcube.spec
|
||||
- run: mkdir -p /root/rpmbuild/SOURCES && spectool -g -R musikcube.spec
|
||||
- run: rpmbuild -ba -vv musikcube.spec
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/rpmbuild/RPMS/x86_64/*.rpm
|
||||
- run: mkdir -p /root/rpms && mv /root/rpmbuild/RPMS/x86_64/*.rpm /root/rpms/
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/rpms
|
||||
- store_artifacts:
|
||||
path: /root/rpms/
|
||||
build_fedora_33:
|
||||
@ -77,8 +77,8 @@ jobs:
|
||||
- run: dnf builddep -y musikcube.spec
|
||||
- run: mkdir -p /root/rpmbuild/SOURCES && spectool -g -R musikcube.spec
|
||||
- run: rpmbuild -ba -vv musikcube.spec
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/rpmbuild/RPMS/x86_64/*.rpm
|
||||
- run: mkdir -p /root/rpms && mv /root/rpmbuild/RPMS/x86_64/*.rpm /root/rpms/
|
||||
- run: ./script/copy-artifacts-to-host.sh /root/rpms
|
||||
- store_artifacts:
|
||||
path: /root/rpms/
|
||||
workflow_filters: &workflow_filters
|
||||
|
@ -1,11 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "${MUSIKCUBE_BUILD_HOST_IP}" ]]; then
|
||||
echo "no build host ip specified"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ -z "${MUSIKCUBE_BUILD_HOST_PW}" ]]; then
|
||||
echo "no build host pw specified"
|
||||
exit
|
||||
fi
|
||||
|
||||
sshpass -p ${MUSIKCUBE_BUILD_HOST_PW} scp "$1/*" build@${MUSIKCUBE_BUILD_HOST_IP}:/home/build/ 2> /dev/null
|
||||
GLOB=${1}
|
||||
|
||||
if [[ -z "${GLOB}" ]]; then
|
||||
echo "no file glob specified."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "copying build artifacts to host..."
|
||||
echo " from: ${GLOB}"
|
||||
ls -al "${GLOB}"
|
||||
sshpass -p ${MUSIKCUBE_BUILD_HOST_PW} scp -o StrictHostKeyChecking=no "${GLOB}" build@${MUSIKCUBE_BUILD_HOST_IP}:/home/build/ 2> /dev/null
|
||||
echo "finished copying build artifacts."
|
||||
|
37
script/run-circle-ci.sh
Executable file
37
script/run-circle-ci.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
IP=$1
|
||||
PW=$2
|
||||
|
||||
if [[ -z "${IP}" ]]; then
|
||||
echo "no file ip address specified."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ -z "${PW}" ]]; then
|
||||
echo "no scp password address specified."
|
||||
exit
|
||||
fi
|
||||
|
||||
ALL_JOBS=(
|
||||
"build_ubuntu_bionic"
|
||||
"build_ubuntu_focal"
|
||||
"build_ubuntu_groovy"
|
||||
"build_fedora_33"
|
||||
"build_fedora_32"
|
||||
"build_fedora_31"
|
||||
)
|
||||
|
||||
BRANCH="clangen/local-circle-ci"
|
||||
REPO="https://github.com/clangen/musikcube"
|
||||
|
||||
for JOB in ${ALL_JOBS[@]}; do
|
||||
circleci local execute \
|
||||
-c .circleci/config.yml \
|
||||
-e CIRCLE_BRANCH=${BRANCH} \
|
||||
-e CIRCLE_REPOSITORY_URL=${REPO} \
|
||||
-e MUSIKCUBE_BUILD_HOST_IP=${IP} \
|
||||
-e MUSIKCUBE_BUILD_HOST_PW=${PW} \
|
||||
--job ${JOB}
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user