From 8fc215d5e15aa27f4b355e8e68c1a638038019f6 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 11 Oct 2024 11:20:21 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fix=20incorrect=20arch=20matching?= =?UTF-8?q?=20for=20Linux=20and=20Windows=20(#84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/runnable.yml | 4 ++-- packages/agent_dart_base/test/test_utils.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/runnable.yml b/.github/workflows/runnable.yml index 74792ea6..81028649 100644 --- a/.github/workflows/runnable.yml +++ b/.github/workflows/runnable.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable @@ -35,4 +35,4 @@ jobs: - run: cd packages/agent_dart_base && dart test ./test/agent_dart_base_test.dart - name: Publish dry run run: melos run publish-dry-run - if: github.repository == 'AstroxNetwork/agent_dart' + if: ${{ github.repository == 'AstroxNetwork/agent_dart' && matrix.os == 'ubuntu-latest' }} diff --git a/packages/agent_dart_base/test/test_utils.dart b/packages/agent_dart_base/test/test_utils.dart index 641030f8..3dbd422b 100644 --- a/packages/agent_dart_base/test/test_utils.dart +++ b/packages/agent_dart_base/test/test_utils.dart @@ -30,8 +30,8 @@ Future ffiInit() { final [os, arch] = Abi.current().toString().split('_'); final libName = switch ((os, arch)) { ('macos', _) || ('linux', 'arm64') => 'libagent_dart.dylib', - ('linux', '_') => 'libagent_dart.so', - ('windows', '_') => 'agent_dart.dll', + ('linux', _) => 'libagent_dart.so', + ('windows', _) => 'agent_dart.dll', _ => throw UnsupportedError('$os $arch is not a supported platform.'), }; return AgentDart.init(