tests.yml: Move environment variables to top level env block.

Unfortunately GitHub actions do not support building one variable from another
in this block, so the values are fully defined.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
This commit is contained in:
Chris PeBenito 2023-04-18 09:42:42 -04:00
parent 395e7783eb
commit 3b0c2095dc

View File

@ -3,8 +3,21 @@ name: Build tests
on: [push, pull_request]
env:
# This should be the minimum version required to run setools:
SELINUX_USERSPACE_VERSION: 3.2
# GitHub doesn't support building env
# vars from others in this block.
USERSPACE_SRC: /tmp/selinux-src
#SEPOL_SRC: ${USERSPACE_SRC}/libsepol
SEPOL_SRC: /tmp/selinux-src/libsepol
#LIBSEPOLA: ${SEPOL_SRC}/src/libsepol.a
LIBSEPOLA: /tmp/selinux-src/libsepol/src/libsepol.a
#SELINUX_SRC: ${USERSPACE_SRC}/libselinux
SELINUX_SRC: /tmp/selinux-src/libselinux
#CHECKPOLICY_SRC: ${USERSPACE_SRC}/checkpolicy
CHECKPOLICY_SRC: /tmp/selinux-src/checkpolicy
jobs:
build:
runs-on: ubuntu-20.04
@ -49,17 +62,6 @@ jobs:
sudo python -m pip install -U \
tox
- name: Configure environment
run: |
USERSPACE_SRC=/tmp/selinux-src
SEPOL_SRC=${USERSPACE_SRC}/libsepol
LIBSEPOLA=${SEPOL_SRC}/src/libsepol.a
echo "USERSPACE_SRC=$USERSPACE_SRC" >> $GITHUB_ENV
echo "SEPOL_SRC=${SEPOL_SRC}" >> $GITHUB_ENV
echo "LIBSEPOLA=${LIBSEPOLA}" >> $GITHUB_ENV
echo "SELINUX_SRC=${USERSPACE_SRC}/libselinux" >> $GITHUB_ENV
echo "CHECKPOLICY_SRC=${USERSPACE_SRC}/checkpolicy" >> $GITHUB_ENV
- name: Build toolchain
run: |
# Download current SELinux userspace tools and libraries