From ff6b8d63ee88f8d99f8530fb0494fe656dec0933 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Wed, 22 Jan 2025 17:38:28 +0100 Subject: [PATCH 01/29] install libssl-dev for aarch64 binaries --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d87ce9ea8..b2e485588 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -145,7 +145,7 @@ jobs: if: matrix.target == 'aarch64-unknown-linux-gnu' run: | sudo apt-get update -y - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV From 918edce909a9bd479329af8dd4965260c30390f5 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 10:55:51 +0100 Subject: [PATCH 02/29] install arm64 libssl --- .github/workflows/release.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2e485588..876c35028 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,9 @@ name: Release on: + pull_request: + branches: + - main schedule: - cron: "0 0 * * *" workflow_dispatch: @@ -90,26 +93,26 @@ jobs: # `target`: Rust build target triple # `platform` and `arch`: Used in tarball names # `svm`: target platform to use for the Solc binary: https://github.com/roynalnaruto/svm-rs/blob/84cbe0ac705becabdc13168bae28a45ad2299749/svm-builds/build.rs#L4-L24 - - runner: ubuntu-24.04-github-hosted-16core - target: x86_64-unknown-linux-gnu - svm_target_platform: linux-amd64 - platform: linux - arch: amd64 + # - runner: ubuntu-24.04-github-hosted-16core + # target: x86_64-unknown-linux-gnu + # svm_target_platform: linux-amd64 + # platform: linux + # arch: amd64 - runner: ubuntu-24.04-github-hosted-16core target: aarch64-unknown-linux-gnu svm_target_platform: linux-aarch64 platform: linux arch: arm64 - - runner: macos-latest - target: x86_64-apple-darwin - svm_target_platform: macosx-amd64 - platform: darwin - arch: amd64 - - runner: macos-latest - target: aarch64-apple-darwin - svm_target_platform: macosx-aarch64 - platform: darwin - arch: arm64 + # - runner: macos-latest + # target: x86_64-apple-darwin + # svm_target_platform: macosx-amd64 + # platform: darwin + # arch: amd64 + # - runner: macos-latest + # target: aarch64-apple-darwin + # svm_target_platform: macosx-aarch64 + # platform: darwin + # arch: arm64 steps: - uses: actions/checkout@v4 with: @@ -145,7 +148,7 @@ jobs: if: matrix.target == 'aarch64-unknown-linux-gnu' run: | sudo apt-get update -y - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV From 79eec3ea0bf515d35f4f3e74827fc306929926ec Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:00:15 +0100 Subject: [PATCH 03/29] add architecture --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 876c35028..5e1cca218 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,8 +147,10 @@ jobs: - name: Linux ARM setup if: matrix.target == 'aarch64-unknown-linux-gnu' run: | + echo $CROSS_DEB_ARCH + sudo dpkg --add-architecture $CROSS_DEB_ARCH sudo apt-get update -y - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:CROSS_DEB_ARCH echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV From 025d2627a7d2d6c896134b713050e8f4d352f5c3 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:06:16 +0100 Subject: [PATCH 04/29] add architecture --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e1cca218..895621f15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,10 +147,9 @@ jobs: - name: Linux ARM setup if: matrix.target == 'aarch64-unknown-linux-gnu' run: | - echo $CROSS_DEB_ARCH - sudo dpkg --add-architecture $CROSS_DEB_ARCH + sudo dpkg --add-architecture arm64 sudo apt-get update -y - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:CROSS_DEB_ARCH + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV From 9650aeddc0b9818fb2f4fe54974169253fa1b9fc Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:12:57 +0100 Subject: [PATCH 05/29] double update --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 895621f15..7755ab58a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,6 +147,7 @@ jobs: - name: Linux ARM setup if: matrix.target == 'aarch64-unknown-linux-gnu' run: | + sudo apt-get update -y sudo dpkg --add-architecture arm64 sudo apt-get update -y sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 From bae4537e76073626d3a55b61a129f50b6d9cd1f1 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:18:01 +0100 Subject: [PATCH 06/29] try with pkg-config --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7755ab58a..6de54e585 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,10 +147,10 @@ jobs: - name: Linux ARM setup if: matrix.target == 'aarch64-unknown-linux-gnu' run: | + #sudo apt-get update -y + #sudo dpkg --add-architecture arm64 sudo apt-get update -y - sudo dpkg --add-architecture arm64 - sudo apt-get update -y - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu pkg-config libssl-dev echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV From 60f6ff63bf03e8e4c55258aa14773d7eae4da88a Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:22:37 +0100 Subject: [PATCH 07/29] dbg --- .github/workflows/release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6de54e585..ff85a691b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,10 +147,12 @@ jobs: - name: Linux ARM setup if: matrix.target == 'aarch64-unknown-linux-gnu' run: | - #sudo apt-get update -y - #sudo dpkg --add-architecture arm64 + ll /etc/apt/sources.list + ll /etc/apt/sources.list.d + sudo dpkg --add-architecture arm64 + deb [arch=arm64] http://ports.ubuntu.com/ focal main multiverse universe sudo apt-get update -y - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu pkg-config libssl-dev + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV From 5a48baa140488fb90ff0de15a28e800e88fb1da7 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:23:35 +0100 Subject: [PATCH 08/29] dbg --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff85a691b..9009d0177 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,8 +147,8 @@ jobs: - name: Linux ARM setup if: matrix.target == 'aarch64-unknown-linux-gnu' run: | - ll /etc/apt/sources.list - ll /etc/apt/sources.list.d + ls -l /etc/apt/sources.list + ls -l /etc/apt/sources.list.d sudo dpkg --add-architecture arm64 deb [arch=arm64] http://ports.ubuntu.com/ focal main multiverse universe sudo apt-get update -y From 0b0372ae8dfd220b8816b2d9a23c22ccaffc944e Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:26:22 +0100 Subject: [PATCH 09/29] dbg --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9009d0177..16b044e2c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -149,6 +149,8 @@ jobs: run: | ls -l /etc/apt/sources.list ls -l /etc/apt/sources.list.d + cat /etc/apt/sources.list + cat /etc/apt/sources.list.d/ubuntu.sources sudo dpkg --add-architecture arm64 deb [arch=arm64] http://ports.ubuntu.com/ focal main multiverse universe sudo apt-get update -y From 5719a7c07af3eadb167523e78e356abc3dcd5197 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:29:05 +0100 Subject: [PATCH 10/29] dbg --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16b044e2c..ede698499 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -152,7 +152,8 @@ jobs: cat /etc/apt/sources.list cat /etc/apt/sources.list.d/ubuntu.sources sudo dpkg --add-architecture arm64 - deb [arch=arm64] http://ports.ubuntu.com/ focal main multiverse universe + echo 'deb [arch=arm64] http://ports.ubuntu.com/ noble main multiverse universe' >> /etc/apt/sources.list + echo 'deb [arch=arm64] http://ports.ubuntu.com/ noble-security main multiverse universe' >> /etc/apt/sources.list sudo apt-get update -y sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV From a48ed510eb4827d0c393263c67573852f4499af3 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:29:20 +0100 Subject: [PATCH 11/29] dbg --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ede698499..eeeda353b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -151,9 +151,9 @@ jobs: ls -l /etc/apt/sources.list.d cat /etc/apt/sources.list cat /etc/apt/sources.list.d/ubuntu.sources - sudo dpkg --add-architecture arm64 echo 'deb [arch=arm64] http://ports.ubuntu.com/ noble main multiverse universe' >> /etc/apt/sources.list echo 'deb [arch=arm64] http://ports.ubuntu.com/ noble-security main multiverse universe' >> /etc/apt/sources.list + sudo dpkg --add-architecture arm64 sudo apt-get update -y sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV From 8726dff04122199e8664610a4abb420aa2a9926d Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:37:05 +0100 Subject: [PATCH 12/29] dbg --- .github/workflows/release.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eeeda353b..41bea8bf5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -151,8 +151,20 @@ jobs: ls -l /etc/apt/sources.list.d cat /etc/apt/sources.list cat /etc/apt/sources.list.d/ubuntu.sources - echo 'deb [arch=arm64] http://ports.ubuntu.com/ noble main multiverse universe' >> /etc/apt/sources.list - echo 'deb [arch=arm64] http://ports.ubuntu.com/ noble-security main multiverse universe' >> /etc/apt/sources.list + echo 'Types: deb + URIs: http://ports.ubuntu.com/ubuntu-ports/ + Suites: noble noble-updates noble-backports + Components: main restricted universe multiverse + Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + + Types: deb + URIs: http://ports.ubuntu.com/ubuntu-ports/ + Suites: noble-security + Components: main restricted universe multiverse + Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' >> /etc/apt/sources.list + + echo 'check' + cat /etc/apt/sources.list.d/ubuntu.sources sudo dpkg --add-architecture arm64 sudo apt-get update -y sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 From 5262e990b88c65c028d1c19159baa5764e9fd425 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:39:00 +0100 Subject: [PATCH 13/29] dbg --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41bea8bf5..c5a1c8c9c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -161,7 +161,7 @@ jobs: URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble-security Components: main restricted universe multiverse - Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' >> /etc/apt/sources.list + Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' >> /etc/apt/sources.list.d/ubuntu.sources echo 'check' cat /etc/apt/sources.list.d/ubuntu.sources From 0d74c7da6e2866e459d59667563fc3ed50c602d2 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:43:07 +0100 Subject: [PATCH 14/29] dbg --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5a1c8c9c..a51b1a354 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,10 +147,10 @@ jobs: - name: Linux ARM setup if: matrix.target == 'aarch64-unknown-linux-gnu' run: | + set -x ls -l /etc/apt/sources.list ls -l /etc/apt/sources.list.d - cat /etc/apt/sources.list - cat /etc/apt/sources.list.d/ubuntu.sources + echo 'updating' echo 'Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble noble-updates noble-backports From 08ebc80ddd31e95c36e5cb3023b0fca60cf7c1e8 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:47:13 +0100 Subject: [PATCH 15/29] dbg --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a51b1a354..6317dc930 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -151,7 +151,7 @@ jobs: ls -l /etc/apt/sources.list ls -l /etc/apt/sources.list.d echo 'updating' - echo 'Types: deb + sudo echo 'Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble noble-updates noble-backports Components: main restricted universe multiverse From 82efc0184f75746d08da9b47f13e26b0a7529135 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:55:27 +0100 Subject: [PATCH 16/29] dbg --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6317dc930..377e19e35 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -151,6 +151,8 @@ jobs: ls -l /etc/apt/sources.list ls -l /etc/apt/sources.list.d echo 'updating' + sudo echo '#foo' >> /etc/apt/sources.list.d/ubuntu.sources + echo 'updating2' sudo echo 'Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble noble-updates noble-backports From f18e3563638e24998d6f2a98b2f29277a3057fe6 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 11:58:29 +0100 Subject: [PATCH 17/29] dbg --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 377e19e35..084dda011 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -150,7 +150,11 @@ jobs: set -x ls -l /etc/apt/sources.list ls -l /etc/apt/sources.list.d + cat /etc/apt/sources.list.d/ubuntu.sources + ls -l /etc/apt/sources.list.d/ubuntu.sources echo 'updating' + sudo echo '#foo' >> /tmp/ubuntu.sources-none + sudo echo '#foo' >> /etc/apt/sources.list.d/ubuntu.sources-none sudo echo '#foo' >> /etc/apt/sources.list.d/ubuntu.sources echo 'updating2' sudo echo 'Types: deb From e695d364b348ca186812fbda885bb7ad2938791a Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 12:01:29 +0100 Subject: [PATCH 18/29] dbg --- .github/workflows/release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 084dda011..b23c12764 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -153,9 +153,10 @@ jobs: cat /etc/apt/sources.list.d/ubuntu.sources ls -l /etc/apt/sources.list.d/ubuntu.sources echo 'updating' - sudo echo '#foo' >> /tmp/ubuntu.sources-none - sudo echo '#foo' >> /etc/apt/sources.list.d/ubuntu.sources-none - sudo echo '#foo' >> /etc/apt/sources.list.d/ubuntu.sources + sudo echo '#foo-tmp' >> /tmp/ubuntu.sources-none + sudo echo '#foo-sources.list' >> /etc/apt/sources.list + sudo echo '#foo-sources.list.d' >> /etc/apt/sources.list.d/ubuntu.sources-none + sudo echo '#foosources.list.d-ubuntu' >> /etc/apt/sources.list.d/ubuntu.sources echo 'updating2' sudo echo 'Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ From beed7031234edf5a0c9c403ec4cd7efb1af51dbe Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 12:06:07 +0100 Subject: [PATCH 19/29] dbg --- .github/workflows/release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b23c12764..2bae27123 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -153,7 +153,18 @@ jobs: cat /etc/apt/sources.list.d/ubuntu.sources ls -l /etc/apt/sources.list.d/ubuntu.sources echo 'updating' - sudo echo '#foo-tmp' >> /tmp/ubuntu.sources-none + sudo echo 'Types: deb + URIs: http://ports.ubuntu.com/ubuntu-ports/ + Suites: noble noble-updates noble-backports + Components: main restricted universe multiverse + Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + + Types: deb + URIs: http://ports.ubuntu.com/ubuntu-ports/ + Suites: noble-security + Components: main restricted universe multiverse + Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' >> /tmp/ubuntu.sources-none + cat /tmp/ubuntu.sources-none sudo echo '#foo-sources.list' >> /etc/apt/sources.list sudo echo '#foo-sources.list.d' >> /etc/apt/sources.list.d/ubuntu.sources-none sudo echo '#foosources.list.d-ubuntu' >> /etc/apt/sources.list.d/ubuntu.sources From 6b0da16f87c15464b35b27af053d5efc3d58b823 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 13:09:18 +0100 Subject: [PATCH 20/29] dbg --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bae27123..9225fa12c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -152,6 +152,8 @@ jobs: ls -l /etc/apt/sources.list.d cat /etc/apt/sources.list.d/ubuntu.sources ls -l /etc/apt/sources.list.d/ubuntu.sources + whoami + sudo whoami echo 'updating' sudo echo 'Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ @@ -181,6 +183,10 @@ jobs: Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' >> /etc/apt/sources.list.d/ubuntu.sources + # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble main universe + # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble-security main universe + + echo 'check' cat /etc/apt/sources.list.d/ubuntu.sources sudo dpkg --add-architecture arm64 From f373c13d28e1c44e104b312187084f3084a8ee13 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 13:27:46 +0100 Subject: [PATCH 21/29] dbg --- .github/workflows/release.yml | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9225fa12c..c0b233c45 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -152,8 +152,7 @@ jobs: ls -l /etc/apt/sources.list.d cat /etc/apt/sources.list.d/ubuntu.sources ls -l /etc/apt/sources.list.d/ubuntu.sources - whoami - sudo whoami + echo 'updating' sudo echo 'Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ @@ -165,23 +164,7 @@ jobs: URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble-security Components: main restricted universe multiverse - Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' >> /tmp/ubuntu.sources-none - cat /tmp/ubuntu.sources-none - sudo echo '#foo-sources.list' >> /etc/apt/sources.list - sudo echo '#foo-sources.list.d' >> /etc/apt/sources.list.d/ubuntu.sources-none - sudo echo '#foosources.list.d-ubuntu' >> /etc/apt/sources.list.d/ubuntu.sources - echo 'updating2' - sudo echo 'Types: deb - URIs: http://ports.ubuntu.com/ubuntu-ports/ - Suites: noble noble-updates noble-backports - Components: main restricted universe multiverse - Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg - - Types: deb - URIs: http://ports.ubuntu.com/ubuntu-ports/ - Suites: noble-security - Components: main restricted universe multiverse - Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' >> /etc/apt/sources.list.d/ubuntu.sources + Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' | sudo dd of=/etc/apt/sources.list.d/ubuntu.sources # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble main universe # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble-security main universe From 57b680a66769193d67c058af1fb9488961c1074d Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 13:35:16 +0100 Subject: [PATCH 22/29] dbg --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0b233c45..2ae652ea5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,12 +157,14 @@ jobs: sudo echo 'Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble noble-updates noble-backports + Architectures: arm64 Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble-security + Architectures: arm64 Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' | sudo dd of=/etc/apt/sources.list.d/ubuntu.sources From e5e061fcc985212d3d7efec753591c99bdcb7e7d Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 13:48:53 +0100 Subject: [PATCH 23/29] dbg --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ae652ea5..56aef48d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -176,7 +176,7 @@ jobs: cat /etc/apt/sources.list.d/ubuntu.sources sudo dpkg --add-architecture arm64 sudo apt-get update -y - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu pkg-config pkg-config:arm64 libssl-dev:arm64 echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV From 51cfb46c784d5150ec04bff0b7ab9323cf075df5 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 14:17:26 +0100 Subject: [PATCH 24/29] use cross --- .github/workflows/release.yml | 81 ++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56aef48d5..64c475a72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,19 +124,22 @@ jobs: - name: Install required Rust targets run: rustup target add ${{ matrix.target }} + + - name: Install cross v0.2.5 from source + run: cargo install cross --git https://github.com/cross-rs/cross --tag v0.2.5 - uses: Swatinem/rust-cache@v2 with: key: ${{ matrix.target }} cache-on-failure: true - - name: Apple M1 setup - if: matrix.target == 'aarch64-apple-darwin' - run: | - brew install make - echo "PATH=/usr/local/opt/make/libexec/gnubin:$PATH" >> $GITHUB_ENV - echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV - echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV + # - name: Apple M1 setup + # if: matrix.target == 'aarch64-apple-darwin' + # run: | + # brew install make + # echo "PATH=/usr/local/opt/make/libexec/gnubin:$PATH" >> $GITHUB_ENV + # echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV + # echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV - name: Apple Darwin if: matrix.target == 'x86_64-apple-darwin' @@ -144,42 +147,42 @@ jobs: brew install make echo "PATH=/usr/local/opt/make/libexec/gnubin:$PATH" >> $GITHUB_ENV - - name: Linux ARM setup - if: matrix.target == 'aarch64-unknown-linux-gnu' - run: | - set -x - ls -l /etc/apt/sources.list - ls -l /etc/apt/sources.list.d - cat /etc/apt/sources.list.d/ubuntu.sources - ls -l /etc/apt/sources.list.d/ubuntu.sources + # - name: Linux ARM setup + # if: matrix.target == 'aarch64-unknown-linux-gnu' + # run: | + # set -x + # ls -l /etc/apt/sources.list + # ls -l /etc/apt/sources.list.d + # cat /etc/apt/sources.list.d/ubuntu.sources + # ls -l /etc/apt/sources.list.d/ubuntu.sources - echo 'updating' - sudo echo 'Types: deb - URIs: http://ports.ubuntu.com/ubuntu-ports/ - Suites: noble noble-updates noble-backports - Architectures: arm64 - Components: main restricted universe multiverse - Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + # echo 'updating' + # sudo echo 'Types: deb + # URIs: http://ports.ubuntu.com/ubuntu-ports/ + # Suites: noble noble-updates noble-backports + # Architectures: arm64 + # Components: main restricted universe multiverse + # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg - Types: deb - URIs: http://ports.ubuntu.com/ubuntu-ports/ - Suites: noble-security - Architectures: arm64 - Components: main restricted universe multiverse - Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' | sudo dd of=/etc/apt/sources.list.d/ubuntu.sources + # Types: deb + # URIs: http://ports.ubuntu.com/ubuntu-ports/ + # Suites: noble-security + # Architectures: arm64 + # Components: main restricted universe multiverse + # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' | sudo dd of=/etc/apt/sources.list.d/ubuntu.sources - # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble main universe - # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble-security main universe + # # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble main universe + # # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble-security main universe - echo 'check' - cat /etc/apt/sources.list.d/ubuntu.sources - sudo dpkg --add-architecture arm64 - sudo apt-get update -y - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu pkg-config pkg-config:arm64 libssl-dev:arm64 - echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV - echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV - echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV + # echo 'check' + # cat /etc/apt/sources.list.d/ubuntu.sources + # sudo dpkg --add-architecture arm64 + # sudo apt-get update -y + # sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu pkg-config pkg-config:arm64 libssl-dev:arm64 + # echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV + # echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV + # echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV - name: Build binaries env: @@ -196,7 +199,7 @@ jobs: # flags+=(--features asm-keccak) # fi - RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --bin forge --bin cast --target "$target" "${flags[@]}" + RUSTFLAGS='-C target-feature=+crt-static' OPENSSL_STATIC=1 cross build --release --bin forge --bin cast --target "$target" "${flags[@]}" bins=(cast forge) for name in "${bins[@]}"; do From 1c098c4beec7bc8a7f061449cfc709b29b53063d Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 14:17:33 +0100 Subject: [PATCH 25/29] use cross --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64c475a72..b2411dd8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -141,11 +141,11 @@ jobs: # echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV # echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV - - name: Apple Darwin - if: matrix.target == 'x86_64-apple-darwin' - run: | - brew install make - echo "PATH=/usr/local/opt/make/libexec/gnubin:$PATH" >> $GITHUB_ENV + # - name: Apple Darwin + # if: matrix.target == 'x86_64-apple-darwin' + # run: | + # brew install make + # echo "PATH=/usr/local/opt/make/libexec/gnubin:$PATH" >> $GITHUB_ENV # - name: Linux ARM setup # if: matrix.target == 'aarch64-unknown-linux-gnu' From 725c8f9b2dba5197c255e702d3dd8d1b762b6f6c Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 14:32:22 +0100 Subject: [PATCH 26/29] dbg From 104025260ca5f31fec90385e032f5e9ed266fc9c Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 14:41:49 +0100 Subject: [PATCH 27/29] add cross.toml --- Cross.toml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Cross.toml diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 000000000..c58e0ada4 --- /dev/null +++ b/Cross.toml @@ -0,0 +1,34 @@ +[target.x86_64-unknown-linux-gnu] +image = "ubuntu:24.04" +pre-build = [ + "export DEBIAN_FRONTEND=noninteractive", + "export TZ=Etc/UTC", + "dpkg --add-architecture $CROSS_DEB_ARCH", + "apt update -q && apt upgrade -yq", + "apt install --assume-yes --no-install-recommends libclang-14-dev clang-14 cmake build-essential pkg-config libssl-dev:$CROSS_DEB_ARCH libsasl2-dev llvm-14-dev gnutls-bin", + "apt install -y gcc-11 g++-11", + "update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11", + "update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11" +] + +[target.aarch64-unknown-linux-gnu] +pre-build = [ + "export DEBIAN_FRONTEND=noninteractive", + "dpkg --add-architecture $CROSS_DEB_ARCH", + "apt-get update -q && apt-get install --assume-yes --no-install-recommends libssl-dev:$CROSS_DEB_ARCH pkg-config", +] + + +[target.x86_64-apple-darwin] +image = "macosx-amd64" +pre-build = [ + "brew install make", +] + +[target.aarch64-apple-darwin] +image = "aarch64-apple-darwin" +pre-build = [ + "export SDKROOT=$(xcrun -sdk macosx --show-sdk-path)", + "export MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)", + "brew install make", +] From 27fda55d19da4e9fe9b84e99377c5b9a9f519c05 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 14:52:53 +0100 Subject: [PATCH 28/29] it works? --- .github/workflows/release.yml | 82 +++++++---------------------------- 1 file changed, 16 insertions(+), 66 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2411dd8d..436cd7182 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,26 +93,26 @@ jobs: # `target`: Rust build target triple # `platform` and `arch`: Used in tarball names # `svm`: target platform to use for the Solc binary: https://github.com/roynalnaruto/svm-rs/blob/84cbe0ac705becabdc13168bae28a45ad2299749/svm-builds/build.rs#L4-L24 - # - runner: ubuntu-24.04-github-hosted-16core - # target: x86_64-unknown-linux-gnu - # svm_target_platform: linux-amd64 - # platform: linux - # arch: amd64 + - runner: ubuntu-24.04-github-hosted-16core + target: x86_64-unknown-linux-gnu + svm_target_platform: linux-amd64 + platform: linux + arch: amd64 - runner: ubuntu-24.04-github-hosted-16core target: aarch64-unknown-linux-gnu svm_target_platform: linux-aarch64 platform: linux arch: arm64 - # - runner: macos-latest - # target: x86_64-apple-darwin - # svm_target_platform: macosx-amd64 - # platform: darwin - # arch: amd64 - # - runner: macos-latest - # target: aarch64-apple-darwin - # svm_target_platform: macosx-aarch64 - # platform: darwin - # arch: arm64 + - runner: macos-latest + target: x86_64-apple-darwin + svm_target_platform: macosx-amd64 + platform: darwin + arch: amd64 + - runner: macos-latest + target: aarch64-apple-darwin + svm_target_platform: macosx-aarch64 + platform: darwin + arch: arm64 steps: - uses: actions/checkout@v4 with: @@ -133,57 +133,7 @@ jobs: key: ${{ matrix.target }} cache-on-failure: true - # - name: Apple M1 setup - # if: matrix.target == 'aarch64-apple-darwin' - # run: | - # brew install make - # echo "PATH=/usr/local/opt/make/libexec/gnubin:$PATH" >> $GITHUB_ENV - # echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV - # echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV - - # - name: Apple Darwin - # if: matrix.target == 'x86_64-apple-darwin' - # run: | - # brew install make - # echo "PATH=/usr/local/opt/make/libexec/gnubin:$PATH" >> $GITHUB_ENV - - # - name: Linux ARM setup - # if: matrix.target == 'aarch64-unknown-linux-gnu' - # run: | - # set -x - # ls -l /etc/apt/sources.list - # ls -l /etc/apt/sources.list.d - # cat /etc/apt/sources.list.d/ubuntu.sources - # ls -l /etc/apt/sources.list.d/ubuntu.sources - - # echo 'updating' - # sudo echo 'Types: deb - # URIs: http://ports.ubuntu.com/ubuntu-ports/ - # Suites: noble noble-updates noble-backports - # Architectures: arm64 - # Components: main restricted universe multiverse - # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg - - # Types: deb - # URIs: http://ports.ubuntu.com/ubuntu-ports/ - # Suites: noble-security - # Architectures: arm64 - # Components: main restricted universe multiverse - # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' | sudo dd of=/etc/apt/sources.list.d/ubuntu.sources - - # # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble main universe - # # deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble-security main universe - - - # echo 'check' - # cat /etc/apt/sources.list.d/ubuntu.sources - # sudo dpkg --add-architecture arm64 - # sudo apt-get update -y - # sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu pkg-config pkg-config:arm64 libssl-dev:arm64 - # echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV - # echo "C_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV - # echo "CPLUS_INCLUDE_PATH=/usr/aarch64-linux-gnu/include" >> $GITHUB_ENV - + # We diverge from upstream and build with cross as we're building static binaries - name: Build binaries env: SVM_TARGET_PLATFORM: ${{ matrix.svm_target_platform }} From 91c7533dcfbab884aab3cecdfe16f26b74deec4e Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Thu, 23 Jan 2025 15:01:02 +0100 Subject: [PATCH 29/29] it works? --- .github/workflows/release.yml | 4 ++-- Cross.toml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 436cd7182..83185de6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,12 +106,12 @@ jobs: - runner: macos-latest target: x86_64-apple-darwin svm_target_platform: macosx-amd64 - platform: darwin + platform: macos-latest arch: amd64 - runner: macos-latest target: aarch64-apple-darwin svm_target_platform: macosx-aarch64 - platform: darwin + platform: macos-latest arch: arm64 steps: - uses: actions/checkout@v4 diff --git a/Cross.toml b/Cross.toml index c58e0ada4..f88885d22 100644 --- a/Cross.toml +++ b/Cross.toml @@ -18,7 +18,6 @@ pre-build = [ "apt-get update -q && apt-get install --assume-yes --no-install-recommends libssl-dev:$CROSS_DEB_ARCH pkg-config", ] - [target.x86_64-apple-darwin] image = "macosx-amd64" pre-build = [