mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
Simplify CI script
This commit is contained in:
parent
61bee086f9
commit
e5459845ad
54
.github/workflows/ci.yml
vendored
54
.github/workflows/ci.yml
vendored
@ -14,43 +14,33 @@ jobs:
|
|||||||
name: ${{ matrix.cxx }} ${{ matrix.features }}
|
name: ${{ matrix.cxx }} ${{ matrix.features }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up environment
|
|
||||||
run: |
|
|
||||||
echo 'CXX=${{ matrix.cxx }}' >> $GITHUB_ENV
|
|
||||||
echo 'CXXFLAGS=-Wall -Wextra -pedantic' >> $GITHUB_ENV # XXX: Add -Werror
|
|
||||||
echo 'LDFLAGS=' >> $GITHUB_ENV
|
|
||||||
echo 'SDL_AUDIODRIVER=disk' >> $GITHUB_ENV
|
|
||||||
echo 'SDL_VIDEODRIVER=x11' >> $GITHUB_ENV
|
|
||||||
echo 'DISPLAY=:99.0' >> $GITHUB_ENV
|
|
||||||
- name: Set up environment (flags)
|
|
||||||
if: ${{ matrix.xxx == 'clang++' }}
|
|
||||||
# there are explicit self-assignment tests
|
|
||||||
run: echo "CXXFLAGS=$CXXFLAGS -Wno-self-assign-overloaded" >> $GITHUB_ENV
|
|
||||||
- name: Set up environment (coverage)
|
|
||||||
if: ${{ contains(matrix.features, 'coverage') }}
|
|
||||||
run: |
|
|
||||||
echo "CXXFLAGS=$CXXFLAGS --coverage" >> $GITHUB_ENV
|
|
||||||
echo "LDFLAGS=$LDFLAGS --coverage" >> $GITHUB_ENV
|
|
||||||
- name: Set up environment (optional libs)
|
|
||||||
if: ${{ contains(matrix.features, 'nooptlibs') }}
|
|
||||||
run: echo "CMAKE_ARGS=$CMAKE_ARGS -DSDL2PP_WITH_IMAGE=NO -DSDL2PP_WITH_MIXER=NO -DSDL2PP_WITH_TTF=NO" >> $GITHUB_ENV
|
|
||||||
- name: Set up environment (static build)
|
|
||||||
if: ${{ contains(matrix.features, 'static') }}
|
|
||||||
run: echo "CMAKE_ARGS=$CMAKE_ARGS -DSDL2PP_STATIC=YES" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
run: |
|
run: |
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get install -yqq --no-install-recommends build-essential clang cmake libsdl2-dev cppcheck doxygen graphviz xvfb
|
apt-get install -yqq --no-install-recommends build-essential clang cmake libsdl2-dev cppcheck doxygen graphviz xvfb curl
|
||||||
- name: Install dependencies (optional libs)
|
if [ ${{ !contains(matrix.features, 'nooptlibs') }} = true ]; then
|
||||||
if: ${{ !contains(matrix.features, 'nooptlibs') }}
|
apt-get install -qq --no-install-recommends libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
||||||
run: apt-get install -qq libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
fi
|
||||||
- name: Install dependencies (coverage)
|
if [ ${{ contains(matrix.features, 'coverage') }} = true ]; then
|
||||||
if: ${{ contains(matrix.features, 'coverage') }}
|
apt-get install -qq --no-install-recommends python3-pip git
|
||||||
|
pip install --user pyyaml cpp-coveralls
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Set up environment
|
||||||
run: |
|
run: |
|
||||||
apt-get install -yqq --no-install-recommends python3-pip git curl
|
curl --insecure https://raw.githubusercontent.com/AMDmi3/github_env/c8cc83d/github_env.py > e; chmod 755 e
|
||||||
pip install --user pyyaml cpp-coveralls
|
./e 'CXX=${{ matrix.cxx }}'
|
||||||
|
./e 'CXXFLAGS=-Wall -Wextra -pedantic' # XXX: Add -Werror
|
||||||
|
./e 'SDL_AUDIODRIVER=disk'
|
||||||
|
./e 'SDL_VIDEODRIVER=x11'
|
||||||
|
./e 'DISPLAY=:99.0'
|
||||||
|
./e --if ${{ matrix.xxx == 'clang++' }} 'CXXFLAGS+=-Wno-self-assign-overloaded' # explicit self-assignment tests
|
||||||
|
./e --if ${{ contains(matrix.features, 'coverage') }} 'CXXFLAGS+=--coverage' 'LDFLAGS+=--coverage'
|
||||||
|
./e --if ${{ contains(matrix.features, 'nooptlibs') }} 'CMAKE_ARGS+=-DSDL2PP_WITH_IMAGE=NO -DSDL2PP_WITH_MIXER=NO -DSDL2PP_WITH_TTF=NO'
|
||||||
|
./e --if ${{ contains(matrix.features, 'static') }} 'CMAKE_ARGS+=-DSDL2PP_STATIC=YES'
|
||||||
|
|
||||||
- name: Set up environment for live tests
|
- name: Set up environment for live tests
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user