Skip to content

Commit

Permalink
ci/linux: add dist check
Browse files Browse the repository at this point in the history
  • Loading branch information
azat committed May 5, 2020
1 parent f3bc532 commit 512c88c
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
matrix:
os: [ubuntu-18.04]
EVENT_MATRIX:
- DIST
- NONE
- DISABLE_OPENSSL
- DISABLE_THREAD_SUPPORT
Expand All @@ -43,10 +44,27 @@ jobs:
with:
path: build
key: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-v2
- name: Cache Dist Build
uses: actions/cache@v1.1.0
with:
path: dist
key: ${{ matrix.os }}-cmake-dist-${{ matrix.EVENT_MATRIX }}-v2

- name: Build And Test
shell: bash
run: |
if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
./autogen.sh
mkdir -p dist
cd dist
../configure
rm -fr *.tar.gz
make dist
archive=$(echo *.tar.gz)
tar -vxf $archive
cd $(basename $archive .tar.gz)
fi
if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
Expand Down Expand Up @@ -95,6 +113,11 @@ jobs:
with:
name: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-build
path: build
- uses: actions/upload-artifact@v1
if: failure()
with:
name: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-dist
path: dist

autotools:
runs-on: ${{ matrix.os }}
Expand All @@ -104,6 +127,7 @@ jobs:
matrix:
os: [ubuntu-18.04]
EVENT_MATRIX:
- DIST
- NONE
- DISABLE_OPENSSL
- DISABLE_THREAD_SUPPORT
Expand All @@ -118,6 +142,11 @@ jobs:
with:
path: build
key: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-v2
- name: Cache Dist Build
uses: actions/cache@v1.1.0
with:
path: dist
key: ${{ matrix.os }}-autotools-dist-${{ matrix.EVENT_MATRIX }}-v2

- name: Build And Test
shell: bash
Expand Down Expand Up @@ -145,6 +174,18 @@ jobs:
#run build and test
JOBS=20
./autogen.sh
if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
mkdir -p dist
cd dist
rm -fr *.tar.gz
../configure $EVENT_CONFIGURE_OPTIONS
make dist
archive=$(echo *.tar.gz)
tar -vxf $archive
cd $(basename $archive .tar.gz)
fi
mkdir -p build
cd build
echo [configure]: ../configure $EVENT_CONFIGURE_OPTIONS
Expand All @@ -157,3 +198,8 @@ jobs:
with:
name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-build
path: build
- uses: actions/upload-artifact@v1
if: failure()
with:
name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-dist
path: dist

0 comments on commit 512c88c

Please sign in to comment.