Skip to content

Commit

Permalink
add github action (portable) for macOS 14 (arm64, M1)
Browse files Browse the repository at this point in the history
  • Loading branch information
neodix42 committed May 24, 2024
1 parent 509c07f commit c6dc105
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 0 deletions.
107 changes: 107 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ jobs:
workflow_conclusion: success
skip_unpack: true

- name: Download Mac arm64 artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: ton-arm64-macos.yml
path: artifacts
workflow_conclusion: success
skip_unpack: true

- name: Download and unzip Mac x86-64 artifacts
uses: dawidd6/action-download-artifact@v2
with:
Expand All @@ -43,6 +51,14 @@ jobs:
workflow_conclusion: success
skip_unpack: false

- name: Download and unzip arm64 artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: ton-arm64-macos.yml
path: artifacts
workflow_conclusion: success
skip_unpack: false

- name: Download Windows artifacts
uses: dawidd6/action-download-artifact@v2
with:
Expand Down Expand Up @@ -297,6 +313,97 @@ jobs:
asset_name: tonlib-cli-mac-x86-64
tag: ${{ steps.tag.outputs.TAG }}


# mac arm64

- name: Upload Mac arm64 artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries.zip
asset_name: ton-mac-arm64.zip
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - fift
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/fift
asset_name: fift-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - func
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/func
asset_name: func-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - lite-client
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/lite-client
asset_name: lite-client-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - rldp-http-proxy
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/rldp-http-proxy
asset_name: rldp-http-proxy-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - http-proxy
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/http-proxy
asset_name: http-proxy-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - storage-daemon-cli
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/storage-daemon-cli
asset_name: storage-daemon-cli-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - storage-daemon
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/storage-daemon
asset_name: storage-daemon-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - tonlibjson
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/libtonlibjson.dylib
asset_name: tonlibjson-mac-arm64.dylib
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - libemulator
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/libemulator.dylib
asset_name: libemulator-mac-arm64.dylib
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - tonlib-cli
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/tonlib-cli
asset_name: tonlib-cli-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

# linux x86-64

- name: Upload Linux x86-64 artifacts
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/ton-arm64-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: MacOS TON build (portable, arm64)

on: [push,workflow_dispatch,workflow_call]

jobs:
build:
runs-on: macos-14

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Build TON
run: |
cp assembly/nix/build-macos-nix.sh .
chmod +x build-macos-nix.sh
./build-macos-nix.sh -t
- name: Simple binaries test
run: |
sudo mv /nix/store /nix/store2
artifacts/validator-engine -V
artifacts/lite-client -V
artifacts/fift -V
artifacts/func -V
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: ton-x86_64-macos-binaries
path: artifacts

0 comments on commit c6dc105

Please sign in to comment.