From c0dbcbf9b788999d12661b33c236a99ea13f9ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9A=E5=A5=95=20=E9=BB=84?= <3266343194@qq.com> Date: Sun, 29 Oct 2023 14:45:23 +0800 Subject: [PATCH] Traverse headers list; remove an unused step. --- .github/workflows/rust.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 79615c20..c9a0073e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -159,8 +159,6 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.10" - - name: Install Python dependencies - run: python -m pip install github-action-utils - name: Compress built z3. shell: python id: compress_z3 @@ -172,12 +170,9 @@ jobs: from pathlib import Path from json import loads + def main(): - HEADERS = [ - "z3++.h", "z3.h", "z3_algebraic.h", "z3_api.h", "z3_ast_containers.h", "z3_fixedpoint.h", "z3_fpa.h", "z3_macros.h", "z3_optimization.h", "z3_polynomial.h", "z3_rcf.h", "z3_spacer.h", "z3_v1.h", "z3_version.h" - ] - FROM = Path( - r"${{ env.VCPKG_ROOT }}/installed/${{ matrix.vcpkg_triplet }}") + FROM = Path(r"${{ env.VCPKG_ROOT }}/installed/${{ matrix.vcpkg_triplet }}") TO = Path(r"${{ github.workspace }}/${{ matrix.vcpkg_triplet }}") LIB = Path(r"${{ matrix.lib }}") @@ -185,8 +180,9 @@ jobs: print("`lib` dir:", listdir(FROM / "lib")) mkdir(TO) copyfile(FROM / "lib" / LIB, TO / LIB) - for header in HEADERS: - copyfile(FROM / "include/" / header, TO / header) + for header in listdir(FROM / "include"): + if header.startswith("z3") and header.endswith(".h"): + copyfile(FROM / "include" / header, TO / header) make_archive( base_name=r"${{ matrix.vcpkg_triplet }}",