Skip to content

Commit

Permalink
ci: switch to CircleCI builds (#59)
Browse files Browse the repository at this point in the history
* build: switch to CircleCI builds

* chore: add TODO for CFA
  • Loading branch information
dsanders11 committed Jul 6, 2023
1 parent 4be7737 commit b6c5099
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 56 deletions.
123 changes: 123 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,123 @@
version: 2.1

orbs:
cfa: continuousauth/npm@1.0.2
node: circleci/node@5.1.0
win: circleci/windows@5.0.0

commands:
install:
parameters:
node-version:
description: Node.js version to install
type: string
steps:
- run: git config --global core.autocrlf input
- node/install:
node-version: << parameters.node-version >>
- run: nvm use << parameters.node-version >>
# Can't get yarn installed on Windows with the circleci/node orb, so use npx yarn for commands
- checkout
- run:
name: Init git submodules
command: git submodule update --init --recursive
- restore_cache:
keys:
- v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
- v1-dependencies-{{ arch }}
- run:
name: Install dependencies and build
command: npx yarn install --frozen-lockfile
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}

jobs:
test-linux:
docker:
- image: cimg/base:stable
parameters:
node-version:
description: Node.js version to install
type: string
steps:
- install:
node-version: << parameters.node-version >>
- run: npx yarn test
- store_artifacts:
path: ./bin
test-mac:
macos:
xcode: 13.4.1
resource_class: macos.x86.medium.gen2
parameters:
node-version:
description: Node.js version to install
type: string
steps:
- install:
node-version: << parameters.node-version >>
- run:
name: Build alternative architecture
command: MINIDUMP_BUILD_ARCH=arm64 node build.js
- run: npx yarn test
- store_artifacts:
path: ./bin
test-windows:
executor:
name: win/default
shell: bash.exe
parameters:
node-version:
description: Node.js version to install
type: string
steps:
- install:
node-version: << parameters.node-version >>
- run: npx yarn test
- store_artifacts:
path: ./bin

workflows:
test_and_release:
# Run the test jobs first, then the release only when all the test jobs are successful
jobs:
- test-linux:
matrix:
parameters:
node-version:
- 18.14.0
- 16.19.0
- 14.19.0
- test-mac:
matrix:
parameters:
node-version:
- 18.14.0
- 16.19.0
- 14.19.0
# - test-windows:
# matrix:
# parameters:
# node-version:
# - 18.14.0
# - 16.19.0
# - 14.19.0
# TODO: uncomment this once CFA releases are set up
# - cfa/release:
# requires:
# - test-linux-18.14.0
# - test-linux-16.19.0
# - test-linux-14.19.0
# - test-mac-18.14.0
# - test-mac-16.19.0
# - test-mac-14.19.0
# - test-windows-18.14.0
# - test-windows-16.19.0
# - test-windows-14.19.0
# filters:
# branches:
# only:
# - main
# context: cfa-release
53 changes: 0 additions & 53 deletions .github/workflows/CI.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
@@ -1,6 +1,6 @@
# minidump - Process minidump files

[![CI](https://github.com/electron/node-minidump/actions/workflows/CI.yml/badge.svg)](https://github.com/electron/node-minidump/actions/workflows/CI.yml)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/electron/node-minidump/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/electron/node-minidump/tree/main)
[![npm version](http://img.shields.io/npm/v/minidump.svg)](https://npmjs.org/package/minidump)

## Installing
Expand Down Expand Up @@ -44,8 +44,8 @@ be called with `callback(error, minidump)` upon completion.
this out, then the source code of breakpad will not be included in the npm
package, and it will not be possible to build from source.
- Change the version in `package.json`, make a new git tag, and push it to GitHub.
- Wait until the GitHub Actions on the main branch pass.
- The artifacts of the latest GitHub Action run should be downloaded and placed under the `bin` folder
- Wait until the CircleCI jobs on the main branch pass.
- The artifacts of the latest CircleCI jobs run should be downloaded and placed under the `bin` folder
(replacing the old folder if it exists).

The bin folder should look like the following.
Expand Down

0 comments on commit b6c5099

Please sign in to comment.