diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18fab68..4966d9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,6 @@ name: Build on: push: - # release: - # types: - # - created jobs: linux: @@ -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') @@ -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: @@ -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 }} -