Skip to content

Commit

Permalink
Improve multi-architecture workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed Feb 16, 2024
1 parent ca7d824 commit 0e0bd8b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ jobs:
os: [ubuntu-22.04, macos-12, macos-14, windows-2022]
include:
- os: ubuntu-22.04
name: linux-x64
platform: linux
arch: x64
- os: macos-12
name: darwin-x64
platform: darwin
arch: x64
- os: macos-14
name: darwin-arm64
platform: darwin
arch: arm64
- os: windows-2022
name: win32-x64
platform: win32
arch: x64
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
name: ${{ matrix.platform }}-${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -26,17 +30,17 @@ jobs:
with:
node-version: ${{ matrix.node }}
- run: npm install -g bare-dev
- run: bare-dev configure
- run: bare-dev configure --platform ${{ matrix.platform }} --arch ${{ matrix.arch }}
- run: bare-dev build
- uses: actions/upload-artifact@v4
if: ${{ matrix.name == 'linux-x64' || matrix.name == 'darwin-x64' || matrix.name == 'darwin-arm64' }}
if: ${{ matrix.platform == 'linux' || matrix.platform == 'darwin' }}
with:
name: ${{ matrix.name }}
name: ${{ matrix.platform }}-${{ matrix.arch }}
path: build/bin/bare
- uses: actions/upload-artifact@v4
if: ${{ matrix.name == 'win32-x64' }}
if: ${{ matrix.platform == 'win32' }}
with:
name: ${{ matrix.name }}
name: ${{ matrix.platform }}-${{ matrix.arch }}
path: |
build/bin/Release/bare.exe
build/bin/Release/bare.lib
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,28 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
name: ubuntu
platform: linux
arch: x64
- os: macos-latest
name: macos
platform: darwin
arch: x64
- os: windows-latest
name: windows
platform: win32
arch: x64
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
name: ${{ matrix.platform }}-${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: corestore
key: corestore-${{ matrix.name }}
key: corestore-${{ matrix.platform }}-${{ matrix.arch }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm install -g bare-dev
- run: bare-dev configure --debug
- run: bare-dev configure --debug --platform ${{ matrix.platform }} --arch ${{ matrix.arch }}
- run: bare-dev build --debug
- run: bare-dev test --debug

0 comments on commit 0e0bd8b

Please sign in to comment.