From c68c1f9d750fc13f88b309c25864b4d2b51adcd8 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 24 May 2024 16:22:39 +0200 Subject: [PATCH] Add ripunzip build workflow --- .github/workflows/build-ripunzip.yml | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build-ripunzip.yml diff --git a/.github/workflows/build-ripunzip.yml b/.github/workflows/build-ripunzip.yml new file mode 100644 index 0000000000000..0d4a0a253bf53 --- /dev/null +++ b/.github/workflows/build-ripunzip.yml @@ -0,0 +1,43 @@ +name: Build runzip + +on: + workflow_dispatch: + inputs: + ripunzip-version: + description: "what reference to checktout from google/runzip" + required: false + default: v1.2.1 + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, macos-12, windows-2019] + runs-on: ${{ matrix.os }} + env: + OS: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: + repository: google/ripunzip + ref: ${{ inputs.ripunzip-version }} + - shell: bash + if: runner.os != 'macOS' + run: | + cargo build --release + mv target/release/ripunzip ripunzip-${OS,,} + - shell: bash + if: runner.os == 'macOS' + run: | + rustup --target x86_64-apple-darwin + rustup --target aarch64-apple-darwin + cargo build --target x86_64-apple-darwin --release + cargo build --target aarch64-apple-darwin --release + lipo -create -output ripunzip-macos \ + -arch x86_64 target/x86_64-apple-darwin/release/ripunzip \ + -arch arm64 target/aarch64-apple-darwin/release/ripunzip + - uses: actions/upload-artifact@v4 + with: + name: ripunzip-${{ runner.os }} + path: ripunzip-*