1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
pipelines:
default:
- step:
name: Create and test source tarball
image: atlassian/default-image:2
script:
- make -j2 dist-check
ENABLE_WERROR=1
artifacts:
- cc1541*.tar.*
- cc1541*.zip
- step:
name: Build distribution binaries
trigger: manual
script:
- echo "Building distribution binaries."
- parallel:
- step:
name: Build and test Linux glibc
script:
- export DEB_BUILD_MAINT_OPTIONS="hardening=+all"
- export CPPFLAGS="$(dpkg-buildflags --get CPPFLAGS)"
- export CFLAGS="$(dpkg-buildflags --get CFLAGS)"
- export CXXFLAGS="$(dpkg-buildflags --get CXXFLAGS)"
- export LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
- make -j2 check
CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS"
CXXFLAGS="$CXXFLAGS"
LDFLAGS="$LDFLAGS"
ENABLE_WERROR=1
- strip cc1541
- mv cc1541 cc1541_lin_glibc_x86
artifacts:
- cc1541_lin_glibc_x86
- step:
name: Build and test Windows
image: purplekarrot/mingw-w64-x86-64
script:
- make -j2 cc1541 test_cc1541
CC=x86_64-w64-mingw32-gcc
ENABLE_WERROR=1
- wine ./test_cc1541.exe ./cc1541.exe
artifacts:
- cc1541.exe
- step:
name: Build MacOS
image: andrewd/osxcross
script:
- make -j2 cc1541 test_cc1541
CC=o64-clang
ENABLE_WERROR=1
- mv cc1541 cc1541_mac
- mv test_cc1541 test_cc1541_mac
artifacts:
- cc1541_mac
- test_cc1541_mac
- step:
name: Create binary package
image: kramos/alpine-zip
script:
- export VERSION="$(grep "#define VERSION" cc1541.c | cut -d\" -f2)"
- zip -o cc1541_bin-$VERSION.zip cc1541_lin_glibc_x86 cc1541.exe cc1541_mac LICENSE.txt README.md
artifacts:
- cc1541_bin*.zip
- step:
name: Deploy to Bitbucket downloads
deployment: production
trigger: manual
script:
- export VERSION="$(grep "#define VERSION" cc1541.c | cut -d\" -f2)"
- for f in cc1541-$VERSION.tar.* cc1541-$VERSION.zip cc1541_bin-$VERSION.zip; do
if test -e "$f"; then
echo;
echo "----- $f -----";
curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"$f";
fi;
done
|