mirror-chatterino2/.github/workflows/test.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

87 lines
2.7 KiB
YAML
Raw Normal View History

2020-12-26 23:40:47 +01:00
---
name: Test Ubuntu
2020-12-26 23:40:47 +01:00
on:
pull_request:
workflow_dispatch:
merge_group:
2020-12-26 23:40:47 +01:00
env:
TWITCH_PUBSUB_SERVER_TAG: v1.0.7
2023-06-24 15:03:27 +02:00
QT_QPA_PLATFORM: minimal
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
2020-12-26 23:40:47 +01:00
jobs:
test:
name: "${{ matrix.os }}"
runs-on: ubuntu-latest
container: ${{ matrix.container }}
2020-12-26 23:40:47 +01:00
strategy:
matrix:
include:
- os: "ubuntu-22.04"
container: ghcr.io/chatterino/chatterino2-build-ubuntu-22.04:latest
qt-version: 6.6.1
plugins: true
2020-12-26 23:40:47 +01:00
fail-fast: false
env:
C2_PLUGINS: ${{ matrix.plugins }}
C2_BUILD_WITH_QT6: ${{ startsWith(matrix.qt-version, '6.') }}
2020-12-26 23:40:47 +01:00
steps:
- uses: actions/checkout@v4
2020-12-26 23:40:47 +01:00
with:
submodules: recursive
- name: Create build directory (Ubuntu)
run: mkdir build-test
- name: Install googlebench
2020-12-26 23:40:47 +01:00
run: |
sudo apt update
sudo apt -y install \
libbenchmark-dev
2020-12-26 23:40:47 +01:00
- name: Build (Ubuntu)
run: |
cmake \
-DBUILD_TESTS=On \
-DBUILD_BENCHMARKS=On \
-DBUILD_APP=OFF \
-DCHATTERINO_PLUGINS="$C2_PLUGINS" \
-DCMAKE_PREFIX_PATH="$Qt6_DIR/lib/cmake" \
-DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \
-DCHATTERINO_STATIC_QT_BUILD=On \
..
2023-06-24 15:03:27 +02:00
cmake --build .
2020-12-26 23:40:47 +01:00
working-directory: build-test
- name: Download and extract Twitch PubSub Server Test
run: |
mkdir pubsub-server-test
curl -L -o pubsub-server.tar.gz "https://github.com/Chatterino/twitch-pubsub-server-test/releases/download/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/server-${{ env.TWITCH_PUBSUB_SERVER_TAG }}-linux-amd64.tar.gz"
tar -xzf pubsub-server.tar.gz -C pubsub-server-test
rm pubsub-server.tar.gz
cd pubsub-server-test
curl -L -o server.crt "https://github.com/Chatterino/twitch-pubsub-server-test/raw/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/cmd/server/server.crt"
curl -L -o server.key "https://github.com/Chatterino/twitch-pubsub-server-test/raw/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/cmd/server/server.key"
cd ..
- uses: dtolnay/rust-toolchain@stable
- name: Cargo Install httpbox
run: |
cargo install --git https://github.com/kevinastone/httpbox --rev 89b971f
- name: Test
timeout-minutes: 30
2020-12-26 23:40:47 +01:00
run: |
httpbox --port 9051 &
cd ../pubsub-server-test
./server 127.0.0.1:9050 &
cd ../build-test
ctest --repeat until-pass:4 --output-on-failure --exclude-regex ClassicEmoteNameFiltering
2020-12-26 23:40:47 +01:00
working-directory: build-test