Skip to content

Commit

Permalink
Merge branch 'master' into fix-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jerome-benoit authored Nov 6, 2023
2 parents 1ab5d2d + cbb43eb commit 7b4ea90
Show file tree
Hide file tree
Showing 51 changed files with 3,404 additions and 308 deletions.
207 changes: 205 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,90 @@ jobs:
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install
- run: npm run test
build-node20:
docker:
- image: cimg/node:20.1
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install
- run: npm run test
build-node19:
docker:
- image: cimg/node:19.1
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install
- run: npm run test
build-node18:
docker:
- image: cimg/node:18.1
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install
- run: npm run test
build-node17:
docker:
- image: cimg/node:17.1
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install
- run: npm run test
build-node16:
docker:
- image: cimg/node:16.1
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install
- run: npm run test
build-node15:
docker:
- image: cimg/node:15.1
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install
- run: npm run test
build-node14:
docker:
- image: cimg/node:14.1
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install
- run: npm run test
build-node13-14:
docker:
- image: cimg/node:13.14
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install --unsafe-perm
- run: npm run test
build-node12-22:
docker:
- image: cimg/node:12.22
working_directory: ~/repo
steps:
- checkout
- run: node -v
- run: npm install --unsafe-perm
- run: npm run test

build:
docker:
Expand All @@ -23,7 +105,55 @@ jobs:
name: install dependencies
command: |
go mod vendor
- run: sudo chown circleci:circleci $GOPATH/bin
- run:
name: install node16 npm and npx
command: |
sudo apt-get update
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
echo "node version:"
node --version
echo "npm version:"
npm --version
echo "npx version:"
npx --version
- run:
name: install cyclonedx-cli
command: |
CYCLONEDX_CLI_VERSION=0.24.2
CYCLONEDX_BINARY_NAME=cyclonedx
CYCLONEDX_ARCH=x64
CYCLONEDX_OS=linux
curl -fsSLO --compressed "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${CYCLONEDX_CLI_VERSION}/${CYCLONEDX_BINARY_NAME}-${CYCLONEDX_OS}-${CYCLONEDX_ARCH}"
chmod ug+rwx ${CYCLONEDX_BINARY_NAME}-${CYCLONEDX_OS}-${CYCLONEDX_ARCH}
cp ${CYCLONEDX_BINARY_NAME}-${CYCLONEDX_OS}-${CYCLONEDX_ARCH} ${GOPATH}/bin/${CYCLONEDX_BINARY_NAME}
echo "cyclonedx-cli --version:"
${CYCLONEDX_BINARY_NAME} --version
- run:
name: install cyclonedx-gomod
command: |
echo "cyclonedx-gomod version"
go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest
cyclonedx-gomod version
- run:
name: install cyclonedx-bom
command: |
CYCLONEDX_BOM_PACKAGE=cyclonedx-bom
CYCLONEDX_BOM_VERSION=0.0.9
CYCLONEDX_BOM_BINARY=cyclonedx-bom
npm install ${CYCLONEDX_BOM_PACKAGE}@${CYCLONEDX_BOM_VERSION} --no-save
echo "${CYCLONEDX_BOM_BINARY} -h"
npx ${CYCLONEDX_BOM_BINARY} -h
- run:
name: build mbt binary
command: |
BINARY_NAME=mbt
BUILD_DIR=release
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${BUILD_DIR}/${BINARY_NAME} -v
chmod ug+rwx ${BUILD_DIR}/${BINARY_NAME}
cp ${BUILD_DIR}/${BINARY_NAME} ${GOPATH}/bin/${BINARY_NAME}
${BINARY_NAME} --version
- run: sudo chown circleci:circleci ${GOPATH}/bin
- run: make tools
- run: make lint
- run:
Expand All @@ -36,7 +166,7 @@ jobs:
go install github.com/mattn/goveralls
go install github.com/modocache/gover
go get golang.org/x/crypto/ssh/terminal
- run: go test -v ./... -coverprofile=mta.coverprofile
- run: go test -v ./... -coverprofile=mta.coverprofile -count=1 -timeout 30m
- run: gover
- run: goveralls -v -service=circle-ci -coverprofile=gover.coverprofile -repotoken $COVERALLS_TOKEN

Expand Down Expand Up @@ -581,6 +711,42 @@ workflows:
filters:
branches:
ignore: master
- build-node20:
filters:
branches:
ignore: master
- build-node19:
filters:
branches:
ignore: master
- build-node18:
filters:
branches:
ignore: master
- build-node17:
filters:
branches:
ignore: master
- build-node16:
filters:
branches:
ignore: master
- build-node15:
filters:
branches:
ignore: master
- build-node14:
filters:
branches:
ignore: master
- build-node13-14:
filters:
branches:
ignore: master
- build-node12-22:
filters:
branches:
ignore: master
- compliance:
filters:
branches:
Expand All @@ -603,6 +769,42 @@ workflows:
filters:
branches:
only: master
- build-node20:
filters:
branches:
only: master
- build-node19:
filters:
branches:
only: master
- build-node18:
filters:
branches:
only: master
- build-node17:
filters:
branches:
only: master
- build-node16:
filters:
branches:
only: master
- build-node15:
filters:
branches:
only: master
- build-node14:
filters:
branches:
only: master
- build-node13-14:
filters:
branches:
only: master
- build-node12-22:
filters:
branches:
only: master
- compliance:
filters:
branches:
Expand Down Expand Up @@ -649,6 +851,7 @@ workflows:
# ignore: /.*/
- publish-to-npm:
requires:
# - release-to-github
- test
filters:
tags:
Expand Down
Loading

0 comments on commit 7b4ea90

Please sign in to comment.