From af05e8f6db66d6dfc0b6eb5c3b9243beeb290c5e Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 29 Oct 2024 15:23:00 -0700 Subject: [PATCH 01/29] WIP: check make test --- .github/workflows/rust.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9ae750a77..a18ef8c6d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -79,14 +79,14 @@ jobs: - if: runner.os == 'Linux' run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - - run: make build-test + - run: make test # TODO: enable ARM linux - - if: startsWith(matrix.sys.target, 'x86_64') || runner.os == 'macOS' - # specify directories explicitly (otherwise it will fail with missing symbols) - run: | - for I in cmd/soroban-cli cmd/crates/* cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world ; do - cargo test --target ${{ matrix.sys.target }} --manifest-path $I/Cargo.toml - done +# - if: startsWith(matrix.sys.target, 'x86_64') || runner.os == 'macOS' +# # specify directories explicitly (otherwise it will fail with missing symbols) +# run: | +# for I in cmd/soroban-cli cmd/crates/* cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world ; do +# cargo test --target ${{ matrix.sys.target }} --manifest-path $I/Cargo.toml +# done publish-dry-run: if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') From 82cd74965920d4e561a7d43f7b160f088aaf5951 Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 29 Oct 2024 16:01:23 -0700 Subject: [PATCH 02/29] Update makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8a1333bd9..96611b2c4 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ generate-full-help-doc: cargo run --bin doc-gen --features clap-markdown test: build-test - cargo test + cargo test --workspace e2e-test: cargo test --features it --test it -- integration From 1ae3d82ddcac2be5debaba7a882e88a19a499163 Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 29 Oct 2024 16:03:36 -0700 Subject: [PATCH 03/29] Cleanup --- .github/workflows/rust.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a18ef8c6d..10f4d995b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -80,13 +80,6 @@ jobs: run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test - # TODO: enable ARM linux -# - if: startsWith(matrix.sys.target, 'x86_64') || runner.os == 'macOS' -# # specify directories explicitly (otherwise it will fail with missing symbols) -# run: | -# for I in cmd/soroban-cli cmd/crates/* cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world ; do -# cargo test --target ${{ matrix.sys.target }} --manifest-path $I/Cargo.toml -# done publish-dry-run: if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') From b06cea28e329faa89be7f85543ab94a537389445 Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 29 Oct 2024 16:14:31 -0700 Subject: [PATCH 04/29] Deprecation fix --- .../soroban-test/tests/fixtures/test-wasms/swap/src/test.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/test.rs b/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/test.rs index e32b45e0a..5c973880e 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/test.rs +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/test.rs @@ -11,7 +11,9 @@ use token::Client as TokenClient; use token::StellarAssetClient as TokenAdminClient; fn create_token_contract<'a>(e: &Env, admin: &Address) -> (TokenClient<'a>, TokenAdminClient<'a>) { - let contract_address = e.register_stellar_asset_contract(admin.clone()); + let contract_address = e + .register_stellar_asset_contract_v2(admin.clone()) + .address(); ( TokenClient::new(e, &contract_address), TokenAdminClient::new(e, &contract_address), From 36d241789e498417c62d28198e3588dc71f76552 Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 29 Oct 2024 22:50:52 -0700 Subject: [PATCH 05/29] Add build target --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 10f4d995b..1e2dbeefa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -80,6 +80,9 @@ jobs: run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test + env: + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + CARGO_BUILD_TARGET: ${{ matrix.sys.target }} publish-dry-run: if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') From d0f8dfb2f832da6a36fe5937e29296905f0981d4 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 09:05:05 -0700 Subject: [PATCH 06/29] Add libssl-dev --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1e2dbeefa..97eaf8097 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -77,7 +77,7 @@ jobs: - run: rustup target add ${{ matrix.sys.target }} - run: rustup target add wasm32-unknown-unknown - if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev + run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test env: From 4a5bdffb8fe71b0235e828db62547f96cff0cd55 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 09:26:03 -0700 Subject: [PATCH 07/29] Print openssl dir --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 97eaf8097..54414dfc5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -78,6 +78,8 @@ jobs: - run: rustup target add wasm32-unknown-unknown - if: runner.os == 'Linux' run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev + - if: runner.os == 'Linux' + run: openssl version -d - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test env: From bc9da3572e0f851c3eb841ea0bd49e2cfa510a87 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 09:46:31 -0700 Subject: [PATCH 08/29] cfg path --- .github/workflows/rust.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 54414dfc5..9188aadff 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -77,9 +77,15 @@ jobs: - run: rustup target add ${{ matrix.sys.target }} - run: rustup target add wasm32-unknown-unknown - if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev + run: | + sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev + ssl_dir=`openssl version -d | sed -e 's/OPENSSLDIR: \"\(.*\)\"/\1/g'` + echo "OPENSSL_DIR=${ssl_dir}" >> $GITHUB_ENV + cfg_path=`pkg-config --variable pc_path pkg-config` + echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV - if: runner.os == 'Linux' - run: openssl version -d + run: | + pkg-config --variable pc_path pkg-config - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test env: From bffcd8f05915923006d415b8b779c5bb8fd4a368 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 09:54:29 -0700 Subject: [PATCH 09/29] cfg path --- .github/workflows/rust.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9188aadff..9e180f99a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -79,8 +79,6 @@ jobs: - if: runner.os == 'Linux' run: | sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev - ssl_dir=`openssl version -d | sed -e 's/OPENSSLDIR: \"\(.*\)\"/\1/g'` - echo "OPENSSL_DIR=${ssl_dir}" >> $GITHUB_ENV cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV - if: runner.os == 'Linux' From a9c39826158a0f1fca018e93e5c3a7cf460ada59 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 10:39:58 -0700 Subject: [PATCH 10/29] Add sysroot --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9e180f99a..56973e6c4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -81,6 +81,7 @@ jobs: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV + echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV - if: runner.os == 'Linux' run: | pkg-config --variable pc_path pkg-config From e81df416e7ce0ebfc0f720e775b76894959ba224 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 10:58:52 -0700 Subject: [PATCH 11/29] libssl --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 56973e6c4..7a09e43aa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -78,7 +78,7 @@ jobs: - run: rustup target add wasm32-unknown-unknown - if: runner.os == 'Linux' run: | - sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev + sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev:arm64 cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV From 75e147faa956d3ddeda687da3b55d460189452f9 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 11:26:17 -0700 Subject: [PATCH 12/29] ls --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7a09e43aa..e9173a880 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -82,6 +82,7 @@ jobs: cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV + ls -la /usr/include/ - if: runner.os == 'Linux' run: | pkg-config --variable pc_path pkg-config From c7d814dfb249dd938e3853f8adc169055519d203 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 11:30:35 -0700 Subject: [PATCH 13/29] fix apt --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e9173a880..6f75ff4b0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -78,7 +78,7 @@ jobs: - run: rustup target add wasm32-unknown-unknown - if: runner.os == 'Linux' run: | - sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev:arm64 + sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV From b3c0d425806093d2e33014790521a22999056950 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 11:35:54 -0700 Subject: [PATCH 14/29] ln --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6f75ff4b0..0b9a23f69 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -82,7 +82,8 @@ jobs: cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV - ls -la /usr/include/ + sudo ln -s /usr/include/x86_64-linux-gnu/openssl/opensslconf.h /usr/include/openssl/opensslconf.h + sudo ln -s /usr/include/x86_64-linux-gnu/openssl/configuration.h /usr/include/openssl/configuration.h - if: runner.os == 'Linux' run: | pkg-config --variable pc_path pkg-config From aafb54c14ff34d44f0708ffc917dc0a1339f29a3 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 11:45:56 -0700 Subject: [PATCH 15/29] libssl --- .github/workflows/rust.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0b9a23f69..ffaa1623f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -78,12 +78,11 @@ jobs: - run: rustup target add wasm32-unknown-unknown - if: runner.os == 'Linux' run: | - sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev + sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev:armhf cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV - sudo ln -s /usr/include/x86_64-linux-gnu/openssl/opensslconf.h /usr/include/openssl/opensslconf.h - sudo ln -s /usr/include/x86_64-linux-gnu/openssl/configuration.h /usr/include/openssl/configuration.h + ls -la /usr/include/ - if: runner.os == 'Linux' run: | pkg-config --variable pc_path pkg-config From 7cdbbc7b2ee2915b58a6187ac301fba39c277623 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 12:03:56 -0700 Subject: [PATCH 16/29] arm --- .github/workflows/rust.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ffaa1623f..9b8e8978c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -45,16 +45,16 @@ jobs: matrix: rust: [msrv, latest] sys: - - os: ubuntu-latest-16-cores - target: x86_64-unknown-linux-gnu +# - os: ubuntu-latest-16-cores +# target: x86_64-unknown-linux-gnu - os: ubuntu-latest-16-cores target: aarch64-unknown-linux-gnu - - os: macos-latest - target: x86_64-apple-darwin - - os: macos-latest - target: aarch64-apple-darwin - - os: windows-latest-8-cores - target: x86_64-pc-windows-msvc +# - os: macos-latest +# target: x86_64-apple-darwin +# - os: macos-latest +# target: aarch64-apple-darwin +# - os: windows-latest-8-cores +# target: x86_64-pc-windows-msvc runs-on: ${{ matrix.sys.os }} env: CI_TESTS: true @@ -78,7 +78,9 @@ jobs: - run: rustup target add wasm32-unknown-unknown - if: runner.os == 'Linux' run: | - sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev:armhf + cat /etc/apt/sources.list + sudo dpkg --add-architecture arm64 + sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev:arm64 cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV From ebffbe32fb7d239e07489d09c11ab1c77e5f86d8 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 12:15:20 -0700 Subject: [PATCH 17/29] ... --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9b8e8978c..4b8a9021e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -80,7 +80,8 @@ jobs: run: | cat /etc/apt/sources.list sudo dpkg --add-architecture arm64 - sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev:arm64 + sudo apt update && sudo apt upgrade + sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev:arm64 cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV From b9fc79fb387807848bb73d641844832bfbf3e9e5 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 12:26:22 -0700 Subject: [PATCH 18/29] tmate --- .github/workflows/rust.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4b8a9021e..ed9e4bdb1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -72,6 +72,10 @@ jobs: # Rust will frequently add new warnings and checks. if: matrix.rust == 'msrv' run: echo RUSTFLAGS='-Dwarnings -Dclippy::all -Dclippy::pedantic' >> $GITHUB_ENV + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + limit-access-to-actor: true - run: rustup update - run: cargo version - run: rustup target add ${{ matrix.sys.target }} From 0497af4860a3de2d55cd76287e8042fb67e99ca5 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 13:11:08 -0700 Subject: [PATCH 19/29] apt sources --- .github/workflows/rust.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ed9e4bdb1..0d5ef6f05 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -80,19 +80,31 @@ jobs: - run: cargo version - run: rustup target add ${{ matrix.sys.target }} - run: rustup target add wasm32-unknown-unknown - - if: runner.os == 'Linux' + - if: matrix.sys.target == 'aarch64-unknown-linux-gnu' run: | + sudo cat >> /etc/apt/sources.list << EOF + deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted + + deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted + + deb [arch=arm64] http://ports.ubuntu.com/ jammy universe + deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe + + deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse + deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse + + deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse + EOF + cat /etc/apt/sources.list + sudo dpkg --add-architecture arm64 sudo apt update && sudo apt upgrade + sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev:arm64 cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV - ls -la /usr/include/ - - if: runner.os == 'Linux' - run: | - pkg-config --variable pc_path pkg-config - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test env: From 2bf08fba6ecc1f5c5dd49235eeda278d4bab5969 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 13:14:56 -0700 Subject: [PATCH 20/29] Remove tmate --- .github/workflows/rust.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0d5ef6f05..7b0f40c9d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -72,17 +72,13 @@ jobs: # Rust will frequently add new warnings and checks. if: matrix.rust == 'msrv' run: echo RUSTFLAGS='-Dwarnings -Dclippy::all -Dclippy::pedantic' >> $GITHUB_ENV - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true - run: rustup update - run: cargo version - run: rustup target add ${{ matrix.sys.target }} - run: rustup target add wasm32-unknown-unknown - if: matrix.sys.target == 'aarch64-unknown-linux-gnu' run: | - sudo cat >> /etc/apt/sources.list << EOF + echo " deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted @@ -94,9 +90,7 @@ jobs: deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse - EOF - - cat /etc/apt/sources.list + " | sudo tee -a /etc/apt/sources.list >/dev/null sudo dpkg --add-architecture arm64 sudo apt update && sudo apt upgrade From c17408072344257e9925aec8e9e6034a7fab2b26 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 13:26:22 -0700 Subject: [PATCH 21/29] libudev arm64 --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7b0f40c9d..f22a87fc9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -95,7 +95,7 @@ jobs: sudo dpkg --add-architecture arm64 sudo apt update && sudo apt upgrade - sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev:arm64 + sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev:arm64 pkg-config libssl-dev:arm64 cfg_path=`pkg-config --variable pc_path pkg-config` echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV From 78e48209b21d9ca7d12c338a813bedf199afb854 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 13:34:17 -0700 Subject: [PATCH 22/29] Change runner to arm --- .github/workflows/rust.yml | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f22a87fc9..361470707 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -47,7 +47,7 @@ jobs: sys: # - os: ubuntu-latest-16-cores # target: x86_64-unknown-linux-gnu - - os: ubuntu-latest-16-cores + - os: ubuntu-jammy-16-cores-arm64 target: aarch64-unknown-linux-gnu # - os: macos-latest # target: x86_64-apple-darwin @@ -78,27 +78,27 @@ jobs: - run: rustup target add wasm32-unknown-unknown - if: matrix.sys.target == 'aarch64-unknown-linux-gnu' run: | - echo " - deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted - - deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted - - deb [arch=arm64] http://ports.ubuntu.com/ jammy universe - deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe - - deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse - deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse - - deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse - " | sudo tee -a /etc/apt/sources.list >/dev/null - - sudo dpkg --add-architecture arm64 +# echo " +# deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted +# +# deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted +# +# deb [arch=arm64] http://ports.ubuntu.com/ jammy universe +# deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe +# +# deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse +# deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse +# +# deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse +# " | sudo tee -a /etc/apt/sources.list >/dev/null +# +# sudo dpkg --add-architecture arm64 sudo apt update && sudo apt upgrade - sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev:arm64 pkg-config libssl-dev:arm64 - cfg_path=`pkg-config --variable pc_path pkg-config` - echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV - echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV + sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev +# cfg_path=`pkg-config --variable pc_path pkg-config` +# echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV +# echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test env: From d47d09e04f1294c6b535a09d228f79922d21337f Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 13:39:15 -0700 Subject: [PATCH 23/29] Fix rust job --- .github/workflows/rust.yml | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 361470707..818212cc7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -76,29 +76,11 @@ jobs: - run: cargo version - run: rustup target add ${{ matrix.sys.target }} - run: rustup target add wasm32-unknown-unknown - - if: matrix.sys.target == 'aarch64-unknown-linux-gnu' + - if: runner.os == 'Linux' run: | -# echo " -# deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted -# -# deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted -# -# deb [arch=arm64] http://ports.ubuntu.com/ jammy universe -# deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe -# -# deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse -# deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse -# -# deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse -# " | sudo tee -a /etc/apt/sources.list >/dev/null -# -# sudo dpkg --add-architecture arm64 sudo apt update && sudo apt upgrade sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev -# cfg_path=`pkg-config --variable pc_path pkg-config` -# echo "PKG_CONFIG_PATH=${cfg_path}" >> $GITHUB_ENV -# echo "PKG_CONFIG_SYSROOT_DIR=/home/runner/.local/sysroot" >> $GITHUB_ENV - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test env: From 5823eade7c26c4f50556e167497d3a02b23d2492 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 14:02:08 -0700 Subject: [PATCH 24/29] Update rust-cache --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 818212cc7..39b08815d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -60,7 +60,7 @@ jobs: CI_TESTS: true steps: - uses: actions/checkout@v4 - - uses: stellar/actions/rust-cache@main + - uses: stellar/actions/rust-cache@2e6d2ccfe3c07260044cbc5261ed61dff3a897d1 - name: Use the minimum supported Rust version if: matrix.rust == 'msrv' run: | From 049ce6669b1fe30b6d9ae6a9ed77f4a0fd58eadb Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 14:56:57 -0700 Subject: [PATCH 25/29] Uncomment other OSes --- .github/workflows/rust.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 39b08815d..b282d22f9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -45,16 +45,16 @@ jobs: matrix: rust: [msrv, latest] sys: -# - os: ubuntu-latest-16-cores -# target: x86_64-unknown-linux-gnu + - os: ubuntu-latest-16-cores + target: x86_64-unknown-linux-gnu - os: ubuntu-jammy-16-cores-arm64 target: aarch64-unknown-linux-gnu -# - os: macos-latest -# target: x86_64-apple-darwin -# - os: macos-latest -# target: aarch64-apple-darwin -# - os: windows-latest-8-cores -# target: x86_64-pc-windows-msvc + - os: macos-latest + target: x86_64-apple-darwin + - os: macos-latest + target: aarch64-apple-darwin + - os: windows-latest-8-cores + target: x86_64-pc-windows-msvc runs-on: ${{ matrix.sys.os }} env: CI_TESTS: true From 25519369153936143874864b977c13e040295348 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 15:42:54 -0700 Subject: [PATCH 26/29] Cleanup apt --- .github/workflows/rust.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b282d22f9..f219be989 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -77,10 +77,7 @@ jobs: - run: rustup target add ${{ matrix.sys.target }} - run: rustup target add wasm32-unknown-unknown - if: runner.os == 'Linux' - run: | - sudo apt update && sudo apt upgrade - - sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev pkg-config libssl-dev + run: sudo apt update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test env: From 3a755c2db440eb29b08ac28c5cb6cc64427cced5 Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 16:20:32 -0700 Subject: [PATCH 27/29] Update rust-cache --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f219be989..cf287e228 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -60,7 +60,7 @@ jobs: CI_TESTS: true steps: - uses: actions/checkout@v4 - - uses: stellar/actions/rust-cache@2e6d2ccfe3c07260044cbc5261ed61dff3a897d1 + - uses: stellar/actions/rust-cache@3de70bce21ab18ada0a52dd9aca8651bf6a9521a - name: Use the minimum supported Rust version if: matrix.rust == 'msrv' run: | From b8eec8db210ff85cafcd38c97eb0552540da93bf Mon Sep 17 00:00:00 2001 From: Gleb Date: Wed, 30 Oct 2024 17:04:35 -0700 Subject: [PATCH 28/29] Unpin rust-cache version --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cf287e228..f34beae36 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -60,7 +60,7 @@ jobs: CI_TESTS: true steps: - uses: actions/checkout@v4 - - uses: stellar/actions/rust-cache@3de70bce21ab18ada0a52dd9aca8651bf6a9521a + - uses: stellar/actions/rust-cache@main - name: Use the minimum supported Rust version if: matrix.rust == 'msrv' run: | From 0245d10e71a7e209f9bce11af9503d2dc6d81937 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 6 Nov 2024 05:15:25 -0800 Subject: [PATCH 29/29] keep apt-get --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f34beae36..7b046c8c3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -77,7 +77,7 @@ jobs: - run: rustup target add ${{ matrix.sys.target }} - run: rustup target add wasm32-unknown-unknown - if: runner.os == 'Linux' - run: sudo apt update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev + run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev - run: cargo clippy --all-targets --target ${{ matrix.sys.target }} - run: make test env: