Skip to content

Release 0.5.0

Release 0.5.0 #25

Workflow file for this run

name: release
on:
push:
tags: "*"
jobs:
make_release:
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: set upload_url
id: set_upload_url
uses: noobly314/share-data@v1
with:
share-id: release_url
mode: set
key: url
value: ${{ steps.create_release.outputs.upload_url }}
compile:
needs: make_release
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13] # macos-13 is latest without ARM
# see https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
runs-on: ${{ matrix.os }}
steps:
- name: get upload_url
id: get_upload_url
uses: noobly314/share-data@v1
with:
share-id: release_url
mode: get
key: url
- uses: actions/checkout@v2
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
if: runner.os != 'Windows'
- uses: jiro4989/setup-nim-action@v1
# Fix SSL error with choosenim
- run: |
curl -fO https://curl.se/ca/cacert.pem
install cacert.pem ~/.nimble/bin
ls ~/.nimble/bin
shell: bash
if: runner.os == 'Windows'
- run: |
sudo apt-get install gcc-arm-linux-gnueabihf
nimble build -d:release -d:danger --opt:speed -Y --cpu:arm
mv native_main native_main-armhf
file native_main-armhf
name: armhf build
if: runner.os == 'Linux'
- run: |
sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
nimble build -d:release -d:danger --opt:speed -Y --cpu:arm64
mv native_main native_main-arm64
file native_main-arm64
name: arm64 build
if: runner.os == 'Linux'
- run: nimble build -d:danger -d:release --opt:speed -Y --verbose
- run: |
mv native_main.exe native_main
shell: bash
if: runner.os == 'Windows'
- run: |
mv native_main native_main-x86
nimble build --verbose -d:danger -d:release --opt:speed -Y '--passC:"-target arm64-apple-macos11"' '--passL:"-target arm64-apple-macos11"'
mv native_main native_main-arm64
lipo -create -output native_main native_main-x86 native_main-arm64
if: runner.os == 'macOS'
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.data }}
asset_name: native_main-${{ runner.os }}
asset_path: native_main
asset_content_type: application/octet-stream
- name: Upload Release Asset (ARM)
if: runner.os == 'Linux'
id: upload-release-asset-arm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.data }}
asset_name: native_main-armhf-${{ runner.os }}
asset_path: native_main-armhf
asset_content_type: application/octet-stream
- name: Upload Release Asset (ARM64)
if: runner.os == 'Linux'
id: upload-release-asset-arm64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.data }}
asset_name: native_main-arm64-${{ runner.os }}
asset_path: native_main-arm64
asset_content_type: application/octet-stream