Release Build #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build-linux: | |
| name: Build on Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: sudo apt update && sudo apt install -y curl build-essential | |
| - name: Build the library | |
| run: ./build.sh -release | |
| - name: Package artifacts | |
| run: | | |
| ls | |
| mkdir artifacts | |
| mv libneurosdk.a libneurosdk.so artifacts/ | |
| cp include/neurosdk.h artifacts/ | |
| tar -czvf libneurosdk-linux.tar.gz -C artifacts . | |
| - name: Upload Linux artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libneurosdk-linux | |
| path: libneurosdk-linux.tar.gz | |
| build-macos: | |
| name: Build on macOS | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Xcode Command Line Tools | |
| run: xcode-select --install || true | |
| - name: Build the library | |
| run: ./build.sh -release | |
| - name: Package artifacts | |
| run: | | |
| ls | |
| mkdir artifacts | |
| mv libneurosdk.a libneurosdk.dylib artifacts/ | |
| cp include/neurosdk.h artifacts/ | |
| tar -czvf libneurosdk-macos.tar.gz -C artifacts . | |
| - name: Upload macOS artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libneurosdk-macos | |
| path: libneurosdk-macos.tar.gz | |
| build-windows: | |
| name: Build on Windows | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Install dependencies | |
| run: choco install -y git curl | |
| - name: Build the library | |
| run: .\build.bat -release | |
| - name: Package artifacts | |
| run: | | |
| dir | |
| mkdir artifacts | |
| move libneurosdk.dll artifacts\ | |
| move libneurosdk.lib artifacts\ | |
| move libneurosdk_static.lib artifacts\ | |
| copy include\neurosdk.h artifacts\ | |
| tar -czvf libneurosdk-windows.tar.gz -C artifacts . | |
| - name: Upload Windows artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libneurosdk-windows | |
| path: libneurosdk-windows.tar.gz | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-windows] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download Linux artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: libneurosdk-linux | |
| - name: Download Windows artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: libneurosdk-windows | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| libneurosdk-linux.tar.gz | |
| libneurosdk-windows.tar.gz |