Skip to content

Commit

Permalink
Traverse headers list; remove an unused step.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheVeryDarkness committed Oct 29, 2023
1 parent f7e32e6 commit c0dbcbf
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -172,21 +170,19 @@ 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 }}")
print("`include` dir:", listdir(FROM / "include"))
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 }}",
Expand Down

0 comments on commit c0dbcbf

Please sign in to comment.