File tree Expand file tree Collapse file tree 5 files changed +17
-18
lines changed
Expand file tree Collapse file tree 5 files changed +17
-18
lines changed Original file line number Diff line number Diff line change 4949
5050 - name : Unpack Dependencies
5151 run : |
52- install_root=$(find ./ build -maxdepth 4 -type d -name install 2>/dev/null | head -n 1 || true)
53- [ -n "$install_root" ] && find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \; || true
52+ cd build
53+ python ../nix/cache_dependencies.py unpack
5454
5555 - name : ccache
5656 uses : hendrikmuhs/ccache-action@v1.2
9595 - name : Pack Dependencies
9696 run : |
9797 cd build
98- for install_dir in $(find $(find . -maxdepth 4 -name install) -mindepth 1 -maxdepth 1 -type d); do
99- test -f $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz || tar -czf $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz -C $(dirname "$install_dir") $(basename "$install_dir");
100- done
98+ python ../nix/cache_dependencies.py pack
10199
102100 - name : Commit and Push Changes to Build Repository
103101 run : |
Original file line number Diff line number Diff line change 2626 - name : Unpack Dependencies
2727 run : |
2828 cd ifcopenshell_build
29- python ../IfcOpenShell/pyodide /cache_dependencies.py unpack
29+ python ../IfcOpenShell/nix /cache_dependencies.py unpack
3030
3131 - name : ccache
3232 uses : hendrikmuhs/ccache-action@v1.2
6565 - name : Pack Dependencies
6666 run : |
6767 cd ifcopenshell_build
68- python ../IfcOpenShell/pyodide /cache_dependencies.py pack
68+ python ../IfcOpenShell/nix /cache_dependencies.py pack
6969
7070 - name : Commit and Push Changes to Build Repository
7171 run : |
Original file line number Diff line number Diff line change 4444
4545 - name : Unpack Dependencies
4646 run : |
47- install_root=$(find ./ build -maxdepth 4 -type d -name install 2>/dev/null | head -n 1 || true)
48- [ -n "$install_root" ] && find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \; || true
47+ cd build
48+ python3 ../nix/cache_dependencies.py unpack
4949
5050 - name : ccache
5151 # TODO: Use tag after 1.2.20 releases.
7272 - name : Pack Dependencies
7373 run : |
7474 cd build
75- for install_dir in $(find $(find . -maxdepth 4 -name install) -mindepth 1 -maxdepth 1 -type d); do
76- test -f $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz || tar -czf $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz -C $(dirname "$install_dir") $(basename "$install_dir");
77- done
75+ python3 ../nix/cache_dependencies.py pack
7876
7977 - name : Commit and Push Changes to Build Repository
8078 run : |
Original file line number Diff line number Diff line change 4444
4545 - name : Unpack Dependencies
4646 run : |
47- install_root=$(find ./ build -maxdepth 4 -type d -name install 2>/dev/null | head -n 1 || true)
48- [ -n "$install_root" ] && find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \; || true
47+ cd build
48+ python3 ../nix/cache_dependencies.py unpack
4949
5050 - name : ccache
5151 # TODO: Use tag after 1.2.20 releases.
7272 - name : Pack Dependencies
7373 run : |
7474 cd build
75- for install_dir in $(find $(find . -maxdepth 4 -name install) -mindepth 1 -maxdepth 1 -type d); do
76- test -f $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz || tar -czf $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz -C $(dirname "$install_dir") $(basename "$install_dir");
77- done
75+ python3 ../nix/cache_dependencies.py pack
7876
7977 - name : Commit and Push Changes to Build Repository
8078 run : |
Original file line number Diff line number Diff line change 1010Usage: python cache_dependencies.py [pack|unpack]
1111"""
1212
13+ import platform
1314import sys
1415import tarfile
1516from pathlib import Path
1920
2021
2122def get_install_dir () -> Path :
22- for data in Path .cwd ().glob ("*/*/install" ):
23+ if platform .system () == "Darwin" :
24+ pattern = "Darwin/*/*/install"
25+ else :
26+ pattern = "*/*/install"
27+ for data in Path .cwd ().glob (pattern ):
2328 return data
2429 raise Exception ("No install dir found" )
2530
You can’t perform that action at this time.
0 commit comments