From d51b5a5853d20b8cab76df8bfcc0eaf36b8bef95 Mon Sep 17 00:00:00 2001 From: aeghn Date: Sun, 24 Nov 2024 22:14:53 +0800 Subject: [PATCH] update restop.yml --- .github/workflows/restop.yml | 41 +++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/restop.yml b/.github/workflows/restop.yml index a80bfec..a372b52 100644 --- a/.github/workflows/restop.yml +++ b/.github/workflows/restop.yml @@ -7,18 +7,39 @@ jobs: runs-on: ubuntu-latest container: quay.io/pypa/manylinux2010_x86_64 steps: - - name: Setup Config - id: config + - name: Show GLIBC + run: ldd --version + - name: Checkout sources + uses: actions/checkout@v2 + with: + ref: ${{ github.event.inputs.sha || env.GITHUB_SHA }} + + - name: Set env on push + if: github.event_name == 'push' run: | - echo ::set-output name=SOURCE_TAG::${GITHUB_REF/refs\/tags\//} - echo ::set-output name=TARGET_NAME::x86_64-unknown-linux-musl - - uses: actions/checkout@v1 - - name: Build + echo "INPUT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV + echo "INPUT_TAG=$(git tag --points-at HEAD)" >> $GITHUB_ENV + + - name: Set env on trigger + if: github.event_name == 'workflow_dispatch' run: | - yum install -y gcc gcc-c++ - curl https://sh.rustup.rs -sSf | bash -s -- -y - . $HOME/.cargo/env - cargo build --release + echo "INPUT_SHA=${{ github.event.inputs.sha }}" >> $GITHUB_ENV + echo "INPUT_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - uses: Swatinem/rust-cache@v1 + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release - name: Process and Package if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') env: