From 1ef3093cb92f5405f7f2b717790771d872705866 Mon Sep 17 00:00:00 2001 From: Agent Smith Date: Wed, 10 Apr 2024 13:03:46 +0800 Subject: [PATCH] fix: make release ci happy --- .github/workflows/brew_release.yml | 3 ++- .github/workflows/release.yml | 25 ++++++++++++++++++------- .github/workflows/test.yml | 2 +- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/brew_release.yml b/.github/workflows/brew_release.yml index 01d157866..ff874e7db 100644 --- a/.github/workflows/brew_release.yml +++ b/.github/workflows/brew_release.yml @@ -40,6 +40,7 @@ jobs: install: | lib.install Dir["./planglib"] lib.install "./libvm.a" + lib.install "./libvm.dylib" bin.install "./plc" # Custom test command for your formula so you can run `brew test`. # Optional - string. @@ -51,7 +52,7 @@ jobs: # Darwin AMD pre-existing path example: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-darwin-amd64.tar.gz # Linux ARM pre-existing path example: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-linux-arm64.tar.gz # Optional - booleans. - target_darwin_amd64: true + target_darwin_amd64: false target_darwin_arm64: true # target_linux_amd64: true # target_linux_arm64: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fcc26cbdd..26707b7d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,18 +25,13 @@ jobs: fail-fast: false matrix: config: - - os: "macOS-latest" - dir: osx64 - arch: darwin-amd64 - artifacts: "plc" - RUSTFLAGS: "" - libvm: "libvm.a" - - os: "self-hosted" + - os: "macos-14" dir: osx64 arch: darwin-arm64 artifacts: "plc" RUSTFLAGS: "" libvm: "libvm.a" + libvm_dylib: "libvm.dylib" - os: "ubuntu-latest" dir: linux64 debdir: pivot-lang_0.1.0-1_amd64 @@ -44,11 +39,13 @@ jobs: arch: linux-amd64 RUSTFLAGS: "" libvm: "libvm.a" + libvm_dylib: "libvm.so" - os: "windows-latest" dir: win64 artifacts: "plc.exe" RUSTFLAGS: "-Dwarnings -Ctarget-feature=+crt-static" libvm: "vm.lib" + libvm_dylib: "vm.dll" arch: windows-amd64 steps: - uses: actions/checkout@v4 @@ -116,6 +113,20 @@ jobs: dst = os.environ['OUT_DIR'] + "/" + artifact shutil.copy(src, dst) shell: python + - name: Move libvm dylib + env: + ARTIFACTS: ${{ matrix.config.libvm_dylib }} + OUT_DIR: ${{ matrix.config.dir }} + OS: ${{ matrix.config.os }} + run: | + import os + import shutil + artifacts = os.environ['ARTIFACTS'].split() + for artifact in artifacts: + src = "target/release/%s" % artifact + dst = os.environ['OUT_DIR'] + "/" + artifact + shutil.copy(src, dst) + shell: python - name: Move pllib env: ARTIFACTS: planglib diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index feafdca83..425a56189 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,7 +66,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "windows-latest", "macOS-latest", "self-hosted"] + os: ["ubuntu-latest", "windows-latest", "macos-14"] include: - RUSTFLAGS: "-Dwarnings" CARGO_INCREMENTAL: 1