From 4658768c90e71d77841589c6a31cac0a696f5a10 Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Mon, 24 Jun 2024 13:28:50 +0100 Subject: [PATCH] Build intel apple on own platform --- .github/workflows/build.yaml | 200 ++++++++++++++++++----------------- flake.nix | 1 + 2 files changed, 106 insertions(+), 95 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7272c4a..40377da 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,73 +13,73 @@ concurrency: cancel-in-progress: true jobs: - build-holochain: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Maximize build space - uses: AdityaGarg8/remove-unwanted-software@v2 - with: - remove-dotnet: 'true' - remove-android: 'true' - remove-codeql: 'true' - remove-docker-images: 'true' - - name: Install nix - uses: cachix/install-nix-action@v26 - with: - install_url: https://releases.nixos.org/nix/nix-2.20.4/install - - - name: Build for x86_64-unknown-linux-gnu - run: nix build .#holochain_x86_64-linux - - - name: Build for aarch64-unknown-linux-gnu - run: nix build .#holochain_aarch64-linux - - - name: Build for x86_64-pc-windows-gnu - run: nix build .#holochain_x86_64-windows - - build-holochain-apple: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Install nix - uses: cachix/install-nix-action@v26 - with: - install_url: https://releases.nixos.org/nix/nix-2.20.4/install - - - name: Build for aarch64-apple-darwin - run: nix build .#holochain_x86_64-apple - - - name: Build for x86_64-apple-darwin - run: nix build .#holochain_x86_64-apple - - build-lair-keystore: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Maximize build space - uses: AdityaGarg8/remove-unwanted-software@v2 - with: - remove-dotnet: 'true' - remove-android: 'true' - remove-codeql: 'true' - remove-docker-images: 'true' - - name: Install nix - uses: cachix/install-nix-action@v26 - with: - install_url: https://releases.nixos.org/nix/nix-2.20.4/install - - - name: Build for x86_64-unknown-linux-gnu - run: nix build .#lair_keystore_x86_64-linux - - - name: Build for aarch64-unknown-linux-gnu - run: nix build .#lair_keystore_aarch64-linux - - - name: Build for x86_64-pc-windows-gnu - run: nix build .#lair_keystore_x86_64-windows +# build-holochain: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# +# - name: Maximize build space +# uses: AdityaGarg8/remove-unwanted-software@v2 +# with: +# remove-dotnet: 'true' +# remove-android: 'true' +# remove-codeql: 'true' +# remove-docker-images: 'true' +# - name: Install nix +# uses: cachix/install-nix-action@v26 +# with: +# install_url: https://releases.nixos.org/nix/nix-2.20.4/install +# +# - name: Build for x86_64-unknown-linux-gnu +# run: nix build .#holochain_x86_64-linux +# +# - name: Build for aarch64-unknown-linux-gnu +# run: nix build .#holochain_aarch64-linux +# +# - name: Build for x86_64-pc-windows-gnu +# run: nix build .#holochain_x86_64-windows +# +# build-holochain-apple: +# runs-on: macos-latest +# steps: +# - uses: actions/checkout@v4 +# +# - name: Install nix +# uses: cachix/install-nix-action@v26 +# with: +# install_url: https://releases.nixos.org/nix/nix-2.20.4/install +# +# - name: Build for aarch64-apple-darwin +# run: nix build .#holochain_x86_64-apple +# +# - name: Build for x86_64-apple-darwin +# run: nix build .#holochain_x86_64-apple +# +# build-lair-keystore: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# +# - name: Maximize build space +# uses: AdityaGarg8/remove-unwanted-software@v2 +# with: +# remove-dotnet: 'true' +# remove-android: 'true' +# remove-codeql: 'true' +# remove-docker-images: 'true' +# - name: Install nix +# uses: cachix/install-nix-action@v26 +# with: +# install_url: https://releases.nixos.org/nix/nix-2.20.4/install +# +# - name: Build for x86_64-unknown-linux-gnu +# run: nix build .#lair_keystore_x86_64-linux +# +# - name: Build for aarch64-unknown-linux-gnu +# run: nix build .#lair_keystore_aarch64-linux +# +# - name: Build for x86_64-pc-windows-gnu +# run: nix build .#lair_keystore_x86_64-windows build-lair-keystore-apple: runs-on: macos-latest @@ -94,11 +94,8 @@ jobs: - name: Build for aarch64-apple-darwin run: nix build .#lair_keystore_aarch64-apple - - name: Build for x86_64-apple-darwin - run: nix build .#lair_keystore_x86-64-apple - - bundle-x86-64-linux: - runs-on: ubuntu-latest + build-lair-keystore-legacy-apple: + runs-on: macos-13 steps: - uses: actions/checkout@v4 @@ -107,27 +104,40 @@ jobs: with: install_url: https://releases.nixos.org/nix/nix-2.20.4/install - - name: Build Lair Keystore - run: | - nix bundle .#holonix_lair_keystore - ./lair-keystore --version - - - name: Build Holochain - run: | - nix bundle .#holonix_holochain - ./holochain --version - - - name: Build hc CLI - run: | - nix bundle .#holonix_hc - ./hc --version - - - name: Build hc-run-local-services CLI - run: | - nix bundle .#holonix_hc_run_local_services - ./hc-run-local-services --version + - name: Build for x86_64-apple-darwin + run: nix build .#lair_keystore_x86-64-apple - - name: Build hcterm CLI - run: | - nix bundle .#holonix_hcterm - ./hcterm --version +# bundle-x86-64-linux: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# +# - name: Install nix +# uses: cachix/install-nix-action@v26 +# with: +# install_url: https://releases.nixos.org/nix/nix-2.20.4/install +# +# - name: Build Lair Keystore +# run: | +# nix bundle .#holonix_lair_keystore +# ./lair-keystore --version +# +# - name: Build Holochain +# run: | +# nix bundle .#holonix_holochain +# ./holochain --version +# +# - name: Build hc CLI +# run: | +# nix bundle .#holonix_hc +# ./hc --version +# +# - name: Build hc-run-local-services CLI +# run: | +# nix bundle .#holonix_hc_run_local_services +# ./hc-run-local-services --version +# +# - name: Build hcterm CLI +# run: | +# nix bundle .#holonix_hcterm +# ./hcterm --version diff --git a/flake.nix b/flake.nix index 8f14c7b..77e341f 100644 --- a/flake.nix +++ b/flake.nix @@ -73,6 +73,7 @@ crossSystem = "aarch64-darwin"; rustTargetTriple = "aarch64-apple-darwin"; }; + } else if localSystem == "x86_64-darwin" then { "${package}_x86_64-apple" = import ./modules/holochain-cross.nix { inherit localSystem inputs crate package; crossSystem = "x86_64-darwin";