Skip to content

Commit

Permalink
Cache Python packages to reduce the bandwidth usage of PyPI.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoconni committed Oct 19, 2024
1 parent 935ecac commit 6588f7e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/cpp-python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ jobs:
sudo apt-get install cxxtest valgrind binutils-dev
- name: Checkout JSBSim
uses: actions/checkout@v4
- name: Cache Python packages & CTest cost data
# CTestCostData.txt is used by CTest to optimize the distribution of the
# tests between the CPU cores and reduce execution time.
uses: actions/cache@v4
with:
path: |
~/.cache/pip
build/Testing/Temporary/CTestCostData.txt
key: ${{ runner.os }}-${{ hashFiles('tests/CMakeLists.txt', 'python/requirements.tx') }}
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -118,13 +127,6 @@ jobs:
run: |
mkdir build && cd build
cmake -DCPACK_GENERATOR=DEB -DINSTALL_JSBSIM_PYTHON_MODULE=ON -DCMAKE_C_FLAGS_DEBUG="-g -O2" -DCMAKE_CXX_FLAGS_DEBUG="-g -O2" -DCMAKE_BUILD_TYPE=Debug -DSYSTEM_EXPAT=${{matrix.expat}} -DBUILD_SHARED_LIBS=${{matrix.shared_libs}} -DBUILD_JULIA_PACKAGE=${{matrix.build_julia}} -DFPECTL_DISPLAY_STACK_TRACE=${{matrix.display_stack_trace}} -DCMAKE_PREFIX_PATH=$JSBSIM_PREFIX_PATH -DCMAKE_INSTALL_PREFIX=/usr ..
- name: Cache CTest cost data
# This file is used by CTest to optimize the distribution of the tests
# between the cores and reduce execution time.
uses: actions/cache@v4
with:
path: build/Testing/Temporary/CTestCostData.txt
key: ${{ runner.os }}-${{ hashFiles('tests/CMakeLists.txt') }}
- name: Build JSBSim
working-directory: build
run: make --jobs=$(nproc)
Expand Down

0 comments on commit 6588f7e

Please sign in to comment.