Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #60 from spacemeshos/add-m1-ci
Browse files Browse the repository at this point in the history
Add M1 CI
  • Loading branch information
avive authored Nov 1, 2021
2 parents 08ce268 + b6a93ba commit 5ce4318
Showing 1 changed file with 83 additions and 5 deletions.
88 changes: 83 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Build

on:
push:
# release:
# types:
# - created

jobs:
linux:
Expand Down Expand Up @@ -232,9 +229,87 @@ jobs:
name: macos
path: ${{ env.VULKAN_ROOT_LOCATION }}/macOS/lib/libvulkan.1.dylib

macos-m1:
runs-on: self-hosted

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Setup env
run: echo "VULKAN_ROOT_LOCATION=$VULKAN_ROOT_LOCATION" >> $GITHUB_ENV

- run: arch -arm64 cmake -DSPACEMESHCUDA=OFF .

- run: arch -arm64 make

- name: Copy library
run: cp src/libgpu-setup.dylib test/libgpu-setup.dylib

- name: Fix library import paths
run: arch -arm64 install_name_tool -add_rpath @loader_path test/libgpu-setup.dylib

- name: Unit tests - Golden vectors
run: arch -arm64 test/gpu-setup-test --test-vector-check

- name: Unit tests - hash and bitstream
run: arch -arm64 test/gpu-setup-test --unit-tests

- name: Unit tests - PoW
run: arch -arm64 test/gpu-setup-test -tp -d 18 -id 0xe26b543725490682675f6f84ea7689601adeaf14caa7024ec1140c82754ca339 --salt 0x165310acce39719148915c356f25c5cb78e82203222cccdf3c15a9c3684e08cb -si 126202

- name: Unit tests - label lengths
run: arch -arm64 test/gpu-setup-test -il

- name: Unit tests - labels count
run: arch -arm64 test/gpu-setup-test -in

- name: Integration tests - concurrency test
run: arch -arm64 test/gpu-setup-test -ip

- name: Integration tests - cancelation test
run: arch -arm64 test/gpu-setup-test -ic

- name: Upload library
uses: actions/upload-artifact@v2
with:
name: macos-m1
path: src/libgpu-setup.dylib

- name: Upload test app
uses: actions/upload-artifact@v2
with:
name: macos-m1
path: test/gpu-setup-test

- name: Upload api.h
uses: actions/upload-artifact@v2
with:
name: macos-m1
path: include/api.h

- name: Upload MoltenVK
uses: actions/upload-artifact@v2
with:
name: macos-m1
path: ${{ env.VULKAN_ROOT_LOCATION }}/MoltenVK/dylib/macOS/libMoltenVK.dylib

- name: Upload MoltenVK config
uses: actions/upload-artifact@v2
with:
name: macos-m1
path: ${{ env.VULKAN_ROOT_LOCATION }}/MoltenVK/dylib/macOS/MoltenVK_icd.json

- name: Upload Vulkan
uses: actions/upload-artifact@v2
with:
name: macos-m1
path: ${{ env.VULKAN_ROOT_LOCATION }}/macOS/lib/libvulkan.1.dylib

release:
runs-on: ubuntu-latest
needs: [linux, windows, macos]
needs: [linux, windows, macos, macos-m1]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/v')
Expand Down Expand Up @@ -282,6 +357,9 @@ jobs:
# asset_name: libgpu-setup-macos-${{ env.VERSION }}.zip
# asset_content_type: application/zip

- name: Archive MacOS-M1 Library
run: zip --junk-paths libgpu-setup-macos-m1-${{ env.VERSION }}.zip macos-m1/*

- name: Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -290,6 +368,6 @@ jobs:
libgpu-setup-linux-${{ env.VERSION }}.zip
libgpu-setup-windows-${{ env.VERSION }}.zip
libgpu-setup-macos-${{ env.VERSION }}.zip
libgpu-setup-macos-m1-${{ env.VERSION }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5ce4318

Please sign in to comment.