Skip to content

Commit

Permalink
attempt at cleaning up CI a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonkaliski committed Jan 30, 2024
1 parent 25a0071 commit 0dcf1e7
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ env:
DEBUG: napi:*
APP_NAME: ruspty
MACOSX_DEPLOYMENT_TARGET: '10.13'

permissions:
contents: write
id-token: write
Expand All @@ -19,6 +20,7 @@ permissions:
- .editorconfig
- docs/**
pull_request: null

jobs:
build:
strategy:
Expand All @@ -38,11 +40,12 @@ jobs:
npm install -g bun &&
bun run build --target x86_64-unknown-linux-gnu &&
strip *.node
name: stable - ${{ matrix.settings.target }} - node@20
name: Build on ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Setup node
uses: actions/setup-node@v4
if: ${{ !matrix.settings.docker }}
Expand Down Expand Up @@ -91,26 +94,25 @@ jobs:
name: bindings-${{ matrix.settings.target }}
path: ${{ env.APP_NAME }}.*.node
if-no-files-found: error
test-macOS-windows-binding:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}

test-macos-binding:
name: Test on ${{ matrix.settings.target }}
needs:
- build
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
node:
- '20'
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
node-version: 20
- name: Install dependencies
run: bun install
- name: Download artifacts
Expand All @@ -123,44 +125,48 @@ jobs:
shell: bash
- name: Test bindings
run: bun test
test-linux-x64-gnu-binding:
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}

test-linux-binding:
name: Test on ${{ matrix.settings.target }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- '20'
runs-on: ubuntu-latest
settings:
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
node-version: 20
- name: Install dependencies
run: bun install
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: bindings-x86_64-unknown-linux-gnu
name: bindings-${{ matrix.settings.target }}
path: .
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
run: docker run --rm -v $(pwd):/build -w /build oven/bun:1 bun test

publish:
name: Publish
runs-on: ubuntu-latest
needs:
- test-macOS-windows-binding
- test-linux-x64-gnu-binding
- test-macos-binding
- test-linux-binding
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Setup node
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit 0dcf1e7

Please sign in to comment.