1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
qTox/.github/workflows/test.yaml
Anthony Bilinski 9fa7f2e4b6
chore(CI): Split Win deps into their own job
Previously, the four matrix Windows jobs would run in parallel and each
build deps, which is redundant since both debug and release qTox use the
same deps.

Now, the win-deps job builds only the needed two versions of deps, and
the four windows builds wait for it to complete before running in
parallel.
2021-10-24 14:16:34 -07:00

124 lines
3.5 KiB
YAML

name: Test
on: [pull_request, push]
jobs:
build-docs:
name: Docs
runs-on: ubuntu-18.04
env:
DOXYGEN_CONFIG_FILE: doxygen.conf
steps:
- uses: actions/checkout@v2
- name: Run
run: ./.travis/build-docs.sh
build-gitstats:
name: Gitstats
runs-on: ubuntu-18.04
env:
GITSTATS_DIR: gitstats
steps:
- uses: actions/checkout@v2
- name: Install gitstats
run: sudo apt-get install gitstats
- name: Run
run: ./.travis/build-gitstats.sh
build-qtox:
name: Linux
runs-on: ubuntu-18.04
env:
CC: gcc
CXX: g++
steps:
- uses: actions/checkout@v2
- name: Install deps
run: sudo apt-get install ccache lcov
- name: Run
run: ./.travis/build-ubuntu-16-04.sh
- name: Code test coverage
run: |
# Create lcov report
lcov --directory _build --capture --output-file coverage.info
# Filter out system headers and test sources
lcov --remove coverage.info '/usr/*' '*/test/*' '*/*_autogen/*' --output-file coverage.info
# Upload report to codecov.io
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
build-osx:
name: macOS
runs-on: macos-10.15
env:
TRAVIS: true
TRAVIS_BUILD_DIR: ${{ github.workspace }}
steps:
- uses: actions/checkout@v2
- name: homebrew
run: brew upgrade && brew bundle --file ./osx/Brewfile
- name: Run
run: ./.travis/build-osx.sh
APPIMAGE:
name: AppImage
runs-on: ubuntu-18.04
env:
TRAVIS_TAG:
TRAVIS_COMMIT: ${{ github.sha }}
steps:
- uses: actions/checkout@v2
- name: Run
run: ./appimage/build-appimage.sh
FLATPAK:
name: Flatpak
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Run
run: ./flatpak/build-flatpak.sh
win-deps:
name: Windows Deps
runs-on: ubuntu-latest
strategy:
matrix:
arch: [i686, x86_64]
env:
BUILD__: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: cache
key: deps-${{ matrix.arch }}-${{ hashFiles('windows/cross-compile/build.sh') }}-${{ hashFiles('.travis/build-windows.sh') }}
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install zip tree
- name: Deps build stage 1
run: |
./.travis/build-windows.sh "$BUILD__" "release" "cache/${BUILD__}" stage1
- name: Deps build stage 2
run: |
./.travis/build-windows.sh "$BUILD__" "release" "cache/${BUILD__}" stage2
ls -al cache
win:
name: Windows
runs-on: ubuntu-latest
needs: win-deps
strategy:
matrix:
arch: [i686, x86_64]
type: [debug, release]
env:
BUILD__: ${{ matrix.arch }}
BTYPE__: ${{ matrix.type }}
steps:
- uses: actions/checkout@v2
- name: Fetch cached dependencies
uses: actions/cache@v2
with:
path: cache
key: deps-${{ matrix.arch }}-${{ hashFiles('windows/cross-compile/build.sh') }}-${{ hashFiles('.travis/build-windows.sh') }}
- name: qTox build
run: |
./.travis/build-windows.sh "$BUILD__" "$BTYPE__" "cache/${BUILD__}" stage3
- name: Debug info
run: |
ls -al ~/
tree ~/project/workspace -L 4