Skip to content
name: Compile binaries for platform matrix on release
on:
release:
types: [created]
jobs:
linuxBuildX86:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: '2.0.0'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: nimble install -y arraymancer nimpy
- name: Compile nimplex as binary for X86_64 Linux
run: nim c -d:release --cpu:amd64 nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex
asset_name: nimplex-linux-amd64
asset_content_type: application/octet-stream
- name: Compile nimplex as Python module for X86_64 Linux
run: nim c -d:release --cpu:amd64 --app:lib --out:nimplex.so nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.so
asset_name: nimplex-python-linux-amd64.so
asset_content_type: application/octet-stream
macosBuildX86_64:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nim with Homebrew
run: brew install nim
- name: Install dependencies
run: nimble install -y arraymancer nimpy
- name: Compile nimplex as binary for X86_64 MacOS
run: nim c -d:release --cpu:amd64 nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-3
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex
asset_name: nimplex-macos-amd64
asset_content_type: application/octet-stream
- name: Compile nimplex as Python module for X86_64 MacOS
run: nim c -d:release --cpu:amd64 --app:lib --out:nimplex.so nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-4
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.so
asset_name: nimplex-python-macos-amd64.so
asset_content_type: application/octet-stream
macosBuildARM64:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nim with Homebrew
run: brew install nim
- name: Install dependencies
run: nimble install -y arraymancer nimpy
- name: Compile nimplex as binary for ARM MacOS
run: nim c -d:release --cpu:arm64 nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex
asset_name: nimplex-macos-arm64
asset_content_type: application/octet-stream
- name: Compile nimplex as Python module for ARM MacOS
run: nim c -d:release --cpu:arm64 --app:lib --out:nimplex.so nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.so
asset_name: nimplex-python-macos-arm64.so
asset_content_type: application/octet-stream
windowsBuild:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: '2.0.0'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: nimble install -y arraymancer nimpy
- name: Compile nimplex as binary for X86 Windows
run: nim c -d:release --cpu:amd64 nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-7
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.exe
asset_name: nimplex-windows-amd64.exe
asset_content_type: application/octet-stream
- name: Compile nimplex as Python module for X86 Windows
run: nim c -d:release --cpu:amd64 --app:lib --out:nimplex.pyd nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-8
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.pyd
asset_name: nimplex-python-windows-amd64.pyd
asset_content_type: application/octet-stream