Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix swift test step #19

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 63 additions & 62 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,49 @@ on:

env:
CARGO_TERM_COLOR: always
# ACTIONS_STEP_DEBUG: true

jobs:
build_rust_and_test:
name: Rust project - latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- uses: pnpm/action-setup@v4
with:
version: 9
- run: rustup update stable && rustup default stable
- run: rustup toolchain install nightly -c rustfmt
- run: git submodule update --init --recursive
- run: make setup-thirdparty
- run: docker compose up -d
working-directory: test/scripts/forked_state
- run: while ! curl localhost:8545/health; do sleep 1; done
- run: while ! curl localhost:4337/health; do sleep 1; done
- run: while ! curl localhost:3000/ping; do sleep 1; done
- run: cargo build --workspace --features=full --all-targets
- run: cargo test --features=full --lib --bins
# - run: cargo clippy --workspace --features=full --all-targets -- -D warnings
- run: cargo +nightly fmt --all -- --check
# build_rust_and_test:
# name: Rust project - latest
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Run sccache-cache
# uses: mozilla-actions/[email protected]
# - uses: pnpm/action-setup@v4
# with:
# version: 9
# - run: rustup update stable && rustup default stable
# - run: rustup toolchain install nightly -c rustfmt
# - run: git submodule update --init --recursive
# - run: make setup-thirdparty
# - run: docker compose up -d
# working-directory: test/scripts/forked_state
# - run: while ! curl localhost:8545/health; do sleep 1; done
# - run: while ! curl localhost:4337/health; do sleep 1; done
# - run: while ! curl localhost:3000/ping; do sleep 1; done
# - run: cargo build --workspace --features=full --all-targets
# - run: cargo test --features=full --lib --bins
# # - run: cargo clippy --workspace --features=full --all-targets -- -D warnings
# - run: cargo +nightly fmt --all -- --check

udeps:
name: Unused dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- uses: pnpm/action-setup@v4
with:
version: 9
- run: rustup update stable && rustup default stable
- run: rustup toolchain install nightly -c rustfmt
- run: git submodule update --init --recursive
- run: make setup-thirdparty
- run: cargo install cargo-udeps
- run: cargo +nightly udeps --workspace
# udeps:
# name: Unused dependencies
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Run sccache-cache
# uses: mozilla-actions/[email protected]
# - uses: pnpm/action-setup@v4
# with:
# version: 9
# - run: rustup update stable && rustup default stable
# - run: rustup toolchain install nightly -c rustfmt
# - run: git submodule update --init --recursive
# - run: make setup-thirdparty
# - run: cargo install cargo-udeps
# - run: cargo +nightly udeps --workspace

# build_wasm:
# name: Build on WASM
Expand All @@ -69,7 +70,7 @@ jobs:

build_swift_and_test:
name: Swift Package - latest
runs-on: macos-14
runs-on: macos-13
strategy:
matrix:
config:
Expand All @@ -85,25 +86,25 @@ jobs:
- run: git submodule update --init --recursive
- run: make setup-thirdparty
- run: make build-ios-bindings
- name: Select Xcode 15.4
run: sudo xcode-select -s /Applications/Xcode_15.4.app
- name: Build ${{ matrix.config }}
run: make CONFIG=${{ matrix.config }} build-swift-apple-platforms
# - name: Install Docker
# run: |
# HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask docker
# sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
# open -a /Applications/Docker.app --args --unattended --accept-license
# echo "We are waiting for Docker to be up and running. It can take over 2 minutes..."
# while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
# - name: Start test infrastructure
# run: docker compose up --debug
# working-directory: test/scripts/forked_state
# - name: Wait for local RPC to be ready
# run: while ! curl localhost:8545/health; do sleep 1; done
# - name: Wait for local bundler to be ready
# run: while ! curl localhost:4337/health; do sleep 1; done
# - name: Wait for local paymaster to be ready
# run: while ! curl localhost:3000/ping; do sleep 1; done
# - name: Run ${{ matrix.config }} tests
# run: make CONFIG=${{ matrix.config }} test-swift-apple-platforms
- name: Select Xcode 14.2
run: sudo xcode-select -s /Applications/Xcode_14.2.app
# - name: Build ${{ matrix.config }}
# run: make CONFIG=${{ matrix.config }} build-swift-apple-platforms
- name: Install Docker
run: |
brew install docker docker-compose
# Link the Docker Compose v2 plugin so it's understood by the docker CLI
mkdir -p ~/.docker/cli-plugins
ln -sfn /usr/local/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
colima start
- name: Start test infrastructure
run: docker compose up -d
working-directory: test/scripts/forked_state
- name: Wait for local RPC to be ready
run: while ! curl localhost:8545/health; do sleep 1; done
- name: Wait for local bundler to be ready
run: while ! curl localhost:4337/health; do sleep 1; done
- name: Wait for local paymaster to be ready
run: while ! curl localhost:3000/ping; do sleep 1; done
- name: Run ${{ matrix.config }} tests
run: make CONFIG=${{ matrix.config }} test-swift-apple-platforms
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ setup: fetch-thirdparty setup-thirdparty build-debug-mode build-ios-bindings bui
build-swift-apple-platforms:
for platform in "iOS"; do \
xcodebuild \
-skipMacroValidation \
-configuration $(CONFIG) \
-workspace .github/package.xcworkspace \
-scheme yttrium \
Expand All @@ -19,7 +18,6 @@ build-swift-apple-platforms:
test-swift-apple-platforms:
for platform in "$(PLATFORM_IOS)" ; do \
xcodebuild test \
-skipMacroValidation \
-configuration $(CONFIG) \
-workspace .github/package.xcworkspace \
-scheme yttrium \
Expand Down
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// swift-tools-version: 5.10
// swift-tools-version: 5.7
import PackageDescription

let package = Package(
name: "yttrium",
platforms: [
.macOS(.v14),
.macOS(.v13),
.iOS(.v13),
.watchOS(.v10),
.tvOS(.v17)
.watchOS(.v9),
.tvOS(.v16)
],
products: [
.library(
Expand Down
8 changes: 4 additions & 4 deletions crates/ffi/YttriumCore/Package.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// swift-tools-version:5.9.0
// swift-tools-version: 5.7
import PackageDescription
let package = Package(
name: "YttriumCore",
platforms: [
.macOS(.v14),
.macOS(.v13),
.iOS(.v13),
.watchOS(.v10),
.tvOS(.v17)
.watchOS(.v9),
.tvOS(.v16)
],
products: [
.library(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ pub async fn get_sender_address_with_signer(
chain_id: u64,
signer: PrivateKeySigner,
) -> eyre::Result<Address> {
let bundler_base_url = config.clone().endpoints.bundler.base_url;
let paymaster_base_url = config.clone().endpoints.paymaster.base_url;
let rpc_base_url = config.clone().endpoints.rpc.base_url;

let chain_id = ChainId::new_eip155(chain_id.clone());
Expand Down
Loading