Try to fix #69: add armhf64 build #169
This file contains 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: compile | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
compile: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, windows, macos] | |
runs-on: [ubuntu-latest, windows-latest, macos-13] # macos-14+ is 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 | |
steps: | |
- 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:debug -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:debug -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:debug -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' | |
# - run: nimble test -Y | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: native_main-${{ runner.os }} | |
path: native_main | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'Linux' | |
with: | |
name: native_main-armhf-${{ runner.os }} | |
path: native_main-armhf | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'Linux' | |
with: | |
name: native_main-arm64-${{ runner.os }} | |
path: native_main-arm64 |