forked from veeam/blksnap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
circleci: execute build jobs only for changes in specific path
this will avoid multiple build jobs running when not needed, for example changes to README and patches/
- Loading branch information
Showing
2 changed files
with
96 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/2.0/configuration-reference | ||
version: 2.1 | ||
|
||
shared: &shared | ||
steps: | ||
- checkout | ||
- run: | ||
name: Prepare environment | ||
command: | | ||
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | ||
apt-get update | ||
apt-get dist-upgrade -y | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
apt-get install -y g++ cmake uuid-dev libboost-program-options-dev libboost-filesystem-dev libssl-dev debhelper | ||
apt-get install -y dh-dkms || apt-get install -y dkms | ||
- run: | ||
name: Build blksnap-dkms package | ||
working_directory: pkg/deb | ||
command: ./build-blksnap-dkms.sh | ||
- run: | ||
name: Build dev, tools and tests packages | ||
working_directory: pkg/deb | ||
command: ./build-blksnap.sh | ||
- run: | ||
name: Save generate packages as artifacts | ||
working_directory: build | ||
command: | | ||
mkdir /tmp/artifacts | ||
mv *.deb /tmp/artifacts | ||
- store_artifacts: | ||
path: /tmp/artifacts | ||
|
||
jobs: | ||
debian10: | ||
<<: *shared | ||
docker: | ||
- image: library/debian:buster | ||
debian11: | ||
<<: *shared | ||
docker: | ||
- image: library/debian:bullseye | ||
debian12: | ||
<<: *shared | ||
docker: | ||
- image: library/debian:bookworm | ||
ubuntu1404: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:trusty | ||
ubuntu1604: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:xenial | ||
ubuntu1804: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:bionic | ||
ubuntu2004: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:focal | ||
ubuntu2204: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:jammy | ||
ubuntu2310: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:mantic | ||
|
||
workflows: | ||
build-deb: | ||
when: << pipeline.parameters.run-them-all >> | ||
jobs: | ||
- debian10 | ||
- debian11 | ||
- debian12 | ||
- ubuntu2004 | ||
- ubuntu2204 | ||
- ubuntu2310 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,81 +2,20 @@ | |
# See: https://circleci.com/docs/2.0/configuration-reference | ||
version: 2.1 | ||
|
||
shared: &shared | ||
steps: | ||
- checkout | ||
- run: | ||
name: Prepare environment | ||
command: | | ||
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | ||
apt-get update | ||
apt-get dist-upgrade -y | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
apt-get install -y g++ cmake uuid-dev libboost-program-options-dev libboost-filesystem-dev libssl-dev debhelper | ||
apt-get install -y dh-dkms || apt-get install -y dkms | ||
- run: | ||
name: Build blksnap-dkms package | ||
working_directory: pkg/deb | ||
command: ./build-blksnap-dkms.sh | ||
- run: | ||
name: Build dev, tools and tests packages | ||
working_directory: pkg/deb | ||
command: ./build-blksnap.sh | ||
- run: | ||
name: Save generate packages as artifacts | ||
working_directory: build | ||
command: | | ||
mkdir /tmp/artifacts | ||
mv *.deb /tmp/artifacts | ||
- store_artifacts: | ||
path: /tmp/artifacts | ||
setup: true | ||
orbs: | ||
path-filtering: circleci/[email protected] | ||
|
||
jobs: | ||
debian10: | ||
<<: *shared | ||
docker: | ||
- image: library/debian:buster | ||
debian11: | ||
<<: *shared | ||
docker: | ||
- image: library/debian:bullseye | ||
debian12: | ||
<<: *shared | ||
docker: | ||
- image: library/debian:bookworm | ||
ubuntu1404: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:trusty | ||
ubuntu1604: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:xenial | ||
ubuntu1804: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:bionic | ||
ubuntu2004: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:focal | ||
ubuntu2204: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:jammy | ||
ubuntu2310: | ||
<<: *shared | ||
docker: | ||
- image: library/ubuntu:mantic | ||
|
||
workflows: | ||
build-deb: | ||
setup-workflow: | ||
jobs: | ||
- debian10 | ||
- debian11 | ||
- debian12 | ||
- ubuntu2004 | ||
- ubuntu2204 | ||
- ubuntu2310 | ||
- path-filtering/filter: | ||
base-revision: main | ||
config-path: .circleci/build.yml | ||
mapping: | | ||
include/.* run-them-all true | ||
lib/.* run-them-all true | ||
module/.* run-them-all true | ||
tests/.* run-them-all true | ||
tools/.* run-them-all true |