Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 69 additions & 81 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
on:
on:
push:
pull_request:

jobs:
macos_x86_64:
strategy:
matrix:
os: [macos-latest]
arch: [x86_64]

runs-on: ${{ matrix.os }}
runs-on: macos-latest-large
env:
os: macos-latest
arch: x86_64
steps:
- name: Checkout Repo
uses: actions/checkout@v2
Expand All @@ -22,33 +20,29 @@ jobs:
cmake ..
make
cd ..
cp build/mac/tests/openpnp-capture-test deploy/openpnp-capture-test-${{ matrix.os }}-${{ matrix.arch }}
cp build/libopenpnp-capture.dylib deploy/libopenpnp-capture-${{ matrix.os }}-${{ matrix.arch }}.dylib
cp build/mac/tests/openpnp-capture-test deploy/openpnp-capture-test-${{ env.os }}-${{ env.arch }}
cp build/libopenpnp-capture.dylib deploy/libopenpnp-capture-${{ env.os }}-${{ env.arch }}.dylib

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
with:
name: ${{ env.os }}-${{ env.arch }}
path: |
deploy/*

- name: Create Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true

macos_arm64:
strategy:
matrix:
os: [macos-latest]
arch: [arm64]



runs-on: ${{ matrix.os }}
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true

macos_arm64:
runs-on: macos-latest
env:
os: macos-latest
arch: arm64
steps:
- name: Checkout Repo
uses: actions/checkout@v2
Expand All @@ -61,31 +55,29 @@ jobs:
cmake ..
make
cd ..
cp build/mac/tests/openpnp-capture-test deploy/openpnp-capture-test-${{ matrix.os }}-${{ matrix.arch }}
cp build/libopenpnp-capture.dylib deploy/libopenpnp-capture-${{ matrix.os }}-${{ matrix.arch }}.dylib
cp build/mac/tests/openpnp-capture-test deploy/openpnp-capture-test-${{ env.os }}-${{ env.arch }}
cp build/libopenpnp-capture.dylib deploy/libopenpnp-capture-${{ env.os }}-${{ env.arch }}.dylib

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
with:
name: ${{ env.os }}-${{ env.arch }}
path: |
deploy/*

- name: Create Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true

windows_x86_64:
strategy:
matrix:
os: [windows-latest]
arch: [x86_64]

runs-on: ${{ matrix.os }}
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true

windows_x86_64:
runs-on: windows-latest
env:
os: windows-latest
arch: x86_64
steps:
- name: Checkout Repo
uses: actions/checkout@v2
Expand All @@ -101,31 +93,29 @@ jobs:
cmake ..
cmake --build . --config Release
cd ..
cp build/win/tests/Release/openpnp-capture-test.exe deploy/openpnp-capture-test-${{ matrix.os }}-${{ matrix.arch }}.exe
cp build/Release/openpnp-capture.dll deploy/libopenpnp-capture-${{ matrix.os }}-${{ matrix.arch }}.dll
cp build/win/tests/Release/openpnp-capture-test.exe deploy/openpnp-capture-test-${{ env.os }}-${{ env.arch }}.exe
cp build/Release/openpnp-capture.dll deploy/libopenpnp-capture-${{ env.os }}-${{ env.arch }}.dll

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
with:
name: ${{ env.os }}-${{ env.arch }}
path: |
deploy/*

- name: Create Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true

linux_arm64:
strategy:
matrix:
os: [ubuntu-22.04]
arch: [arm64]

runs-on: ${{ matrix.os }}
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true

linux_arm64:
runs-on: ubuntu-22.04-arm
env:
os: ubuntu-22.04
arch: arm64
steps:
- name: Checkout Repo
uses: actions/checkout@v2
Expand All @@ -136,34 +126,32 @@ jobs:
mkdir build
mkdir deploy
cd build
cmake -DCMAKE_BUILD_TYPE=Release cmake ..
cmake -DCMAKE_BUILD_TYPE=Release ..
make
cd ..
cp build/linux/tests/openpnp-capture-test deploy/openpnp-capture-test-${{ matrix.os }}-${{ matrix.arch }}
cp build/libopenpnp-capture.so deploy/libopenpnp-capture-${{ matrix.os }}-${{ matrix.arch }}.so
cp build/linux/tests/openpnp-capture-test deploy/openpnp-capture-test-${{ env.os }}-${{ env.arch }}
cp build/libopenpnp-capture.so deploy/libopenpnp-capture-${{ env.os }}-${{ env.arch }}.so

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
with:
name: ${{ env.os }}-${{ env.arch }}
path: |
deploy/*

- name: Create Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true

linux_x86_64:
strategy:
matrix:
os: [ubuntu-22.04]
arch: [x86_64]

runs-on: ${{ matrix.os }}
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true

linux_x86_64:
runs-on: ubuntu-22.04
env:
os: ubuntu-22.04
arch: x86_64
steps:
- name: Checkout Repo
uses: actions/checkout@v2
Expand All @@ -174,23 +162,23 @@ jobs:
mkdir build
mkdir deploy
cd build
cmake -DCMAKE_BUILD_TYPE=Release cmake ..
cmake -DCMAKE_BUILD_TYPE=Release ..
make
cd ..
cp build/linux/tests/openpnp-capture-test deploy/openpnp-capture-test-${{ matrix.os }}-${{ matrix.arch }}
cp build/libopenpnp-capture.so deploy/libopenpnp-capture-${{ matrix.os }}-${{ matrix.arch }}.so
cp build/linux/tests/openpnp-capture-test deploy/openpnp-capture-test-${{ env.os }}-${{ env.arch }}
cp build/libopenpnp-capture.so deploy/libopenpnp-capture-${{ env.os }}-${{ env.arch }}.so

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
with:
name: ${{ env.os }}-${{ env.arch }}
path: |
deploy/*

- name: Create Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifacts: "deploy/*"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true