Skip to content

Commit 0003338

Browse files
committed
tests.yml: Add package caching.
Signed-off-by: Chris PeBenito <[email protected]>
1 parent cf42cc5 commit 0003338

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,15 @@ jobs:
6262
sudo python -m pip install -U \
6363
tox
6464
65-
- name: Build toolchain
65+
- name: Cache SELinux userspace
66+
uses: actions/cache@v3
67+
id: cache-userspace
68+
with:
69+
path: ${{ env.USERSPACE_SRC }}
70+
key: ${{ runner.os }}-selinux-userspace-${{ env.SELINUX_USERSPACE_VERSION }}
71+
72+
- name: Build SELinux userspace
73+
if: ${{ steps.cache-userspace.outputs.cache-hit != 'true' }}
6674
run: |
6775
# Download current SELinux userspace tools and libraries
6876
git clone https://github.com/SELinuxProject/selinux.git ${USERSPACE_SRC} -b ${SELINUX_USERSPACE_VERSION}

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,5 +165,9 @@ def run(self):
165165
# setup also requires libsepol and libselinux
166166
# C libraries and headers to compile.
167167
setup_requires=['setuptools', 'Cython>=0.27'],
168-
install_requires=['setuptools', 'networkx>=2.0']
168+
install_requires=['setuptools'],
169+
extras_require={
170+
"analysis": "networkx>=2.0",
171+
"test": "tox"
172+
}
169173
)

0 commit comments

Comments
 (0)