2022-01-06 04:00:16 +08:00
|
|
|
name: Build, test, and deploy
|
2021-09-23 18:39:01 +08:00
|
|
|
on: [pull_request, push]
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
jobs:
|
2022-01-06 04:00:16 +08:00
|
|
|
update-nightly-tag:
|
|
|
|
name: Update nightly release tag
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
2022-01-10 16:01:32 +08:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2022-01-06 04:00:16 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Move nightly tag to head for nightly release
|
|
|
|
run: git tag -f nightly && git push origin nightly -f
|
2021-11-08 13:27:45 +08:00
|
|
|
build-flatpak-docker:
|
|
|
|
name: Build flatpak docker
|
|
|
|
runs-on: ubuntu-latest
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-11-08 13:27:45 +08:00
|
|
|
- uses: ./.github/actions/build-docker-image
|
|
|
|
name: "Build docker image"
|
|
|
|
with:
|
|
|
|
docker_image_name: flatpak
|
|
|
|
build-ubuntu-lts-docker:
|
|
|
|
name: Build ubuntu LTS docker image
|
|
|
|
runs-on: ubuntu-latest
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-11-08 13:27:45 +08:00
|
|
|
- uses: ./.github/actions/build-docker-image
|
|
|
|
name: "Build docker image"
|
|
|
|
with:
|
|
|
|
docker_image_name: ubuntu_lts
|
|
|
|
build-debian-docker:
|
|
|
|
name: Build debian docker image
|
|
|
|
runs-on: ubuntu-latest
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-11-08 13:27:45 +08:00
|
|
|
- uses: ./.github/actions/build-docker-image
|
|
|
|
name: "Build docker image"
|
|
|
|
with:
|
|
|
|
docker_image_name: debian
|
|
|
|
build-debian-old-docker:
|
|
|
|
name: Build old debian docker image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/build-docker-image
|
|
|
|
name: "Build docker image"
|
|
|
|
with:
|
|
|
|
docker_image_name: debian_old
|
2022-02-08 16:26:06 +08:00
|
|
|
build-almalinux-docker:
|
|
|
|
name: Build almalinux docker image
|
2021-11-08 13:27:45 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/build-docker-image
|
|
|
|
name: "Build docker image"
|
|
|
|
with:
|
2022-02-08 16:26:06 +08:00
|
|
|
docker_image_name: almalinux
|
2021-11-08 13:27:45 +08:00
|
|
|
build-fedora-docker:
|
|
|
|
name: Build fedora docker image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/build-docker-image
|
|
|
|
name: "Build docker image"
|
|
|
|
with:
|
|
|
|
docker_image_name: fedora
|
|
|
|
build-opensuse-docker:
|
|
|
|
name: Build opensuse docker image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/build-docker-image
|
|
|
|
name: "Build docker image"
|
|
|
|
with:
|
|
|
|
docker_image_name: opensuse
|
|
|
|
build-windows-docker:
|
|
|
|
name: Build windows docker image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/build-docker-image
|
|
|
|
name: "Build docker image"
|
|
|
|
with:
|
|
|
|
docker_image_name: windows_builder
|
|
|
|
build-windows-i686-docker:
|
|
|
|
name: Build 32 bit windows docker image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/build-docker-image
|
|
|
|
name: "Build docker image"
|
|
|
|
with:
|
|
|
|
docker_image_name: windows_builder.i686
|
2022-02-08 16:26:06 +08:00
|
|
|
build-almalinux:
|
|
|
|
name: Almalinux
|
2021-11-08 13:27:45 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-02-08 16:26:06 +08:00
|
|
|
needs: build-almalinux-docker
|
2021-11-08 13:27:45 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
features: [full, minimal]
|
|
|
|
build_type: [Debug, Release]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
2022-02-08 16:26:06 +08:00
|
|
|
docker_image_name: almalinux
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Run build
|
2022-02-17 00:11:27 +08:00
|
|
|
run: docker-compose run --rm almalinux ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
|
2021-11-08 13:27:45 +08:00
|
|
|
build-fedora:
|
2022-02-17 23:36:14 +08:00
|
|
|
name: Fedora with ASAN
|
2021-11-08 13:27:45 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build-fedora-docker
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
features: [full, minimal]
|
|
|
|
build_type: [Debug, Release]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
|
|
|
docker_image_name: fedora
|
|
|
|
- name: Run build
|
2022-03-09 10:55:53 +08:00
|
|
|
run: docker-compose run --rm fedora ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }} --sanitize --online-tests
|
2021-11-08 13:27:45 +08:00
|
|
|
build-opensuse:
|
|
|
|
name: Opensuse
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build-opensuse-docker
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
features: [full, minimal]
|
|
|
|
build_type: [Debug, Release]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
|
|
|
docker_image_name: opensuse
|
|
|
|
- name: Run build
|
2022-02-17 00:11:27 +08:00
|
|
|
run: docker-compose run --rm opensuse ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
|
2021-11-08 13:27:45 +08:00
|
|
|
build-debian:
|
|
|
|
name: Debian
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build-debian-docker
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
features: [full, minimal]
|
|
|
|
build_type: [Debug, Release]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
|
|
|
docker_image_name: debian
|
|
|
|
- name: Run build
|
2022-02-17 00:11:27 +08:00
|
|
|
run: docker-compose run --rm debian ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
|
2021-11-08 13:27:45 +08:00
|
|
|
build-debian-old:
|
|
|
|
name: Debian Old
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build-debian-old-docker
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
features: [full, minimal]
|
|
|
|
build_type: [Debug, Release]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
|
|
|
docker_image_name: debian_old
|
|
|
|
- name: Run build
|
2022-02-17 00:11:27 +08:00
|
|
|
run: docker-compose run --rm debian_old ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
|
2022-02-19 04:44:20 +08:00
|
|
|
translation-check:
|
|
|
|
name: Check for translatable strings
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install deps
|
|
|
|
run: sudo apt-get update && sudo apt-get install qttools5-dev
|
|
|
|
- name: Test for modified translatable strings
|
|
|
|
run: ./tools/update-translation-files.sh ALL && git diff --exit-code
|
2021-11-08 13:27:45 +08:00
|
|
|
build-ubuntu:
|
|
|
|
name: Ubuntu LTS
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build-ubuntu-lts-docker
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
features: [full, minimal]
|
|
|
|
build_type: [Debug, Release]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
|
|
|
docker_image_name: ubuntu_lts
|
|
|
|
- name: Run build
|
2022-02-17 00:11:27 +08:00
|
|
|
run: docker-compose run --rm ubuntu_lts ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Code coverage
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
run: |
|
2021-11-08 13:27:45 +08:00
|
|
|
# https://github.com/actions/runner/issues/491
|
|
|
|
if [ "${{ matrix.build_type }}" == "Release" ] && [ "${{ matrix.features }}" == "full" ]; then
|
2022-02-17 00:11:27 +08:00
|
|
|
docker-compose run --rm ubuntu_lts ./.ci-scripts/lcov.sh
|
2021-11-08 13:27:45 +08:00
|
|
|
# Upload report to codecov.io
|
|
|
|
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
|
|
|
|
fi
|
|
|
|
build-appimage:
|
|
|
|
name: Appimage
|
|
|
|
runs-on: ubuntu-latest
|
2022-01-06 04:00:16 +08:00
|
|
|
needs: [build-ubuntu-lts-docker, update-nightly-tag]
|
|
|
|
if: |
|
|
|
|
always() &&
|
|
|
|
needs.build-ubuntu-lts-docker.result == 'success' &&
|
|
|
|
(needs.update-nightly-tag.result == 'success' ||
|
|
|
|
needs.update-nightly-tag.result == 'skipped')
|
2022-01-10 16:01:32 +08:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2021-11-08 13:27:45 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
|
|
|
docker_image_name: ubuntu_lts
|
|
|
|
- name: Run build
|
2022-02-15 22:49:15 +08:00
|
|
|
run: docker-compose run --rm ubuntu_lts ./appimage/build.sh --src-dir /qtox
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Upload appimage
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: qTox-${{ github.sha }}.x86_64.AppImage
|
|
|
|
path: qTox-*.x86_64.AppImage
|
2022-01-06 11:07:59 +08:00
|
|
|
- name: Get tag name for appimage release file name
|
|
|
|
if: contains(github.ref, 'refs/tags/v')
|
|
|
|
id: get_version
|
|
|
|
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
|
2022-02-19 16:03:11 +08:00
|
|
|
# The zync file names MUST match the pattern "qTox-*.x86_64.AppImage.zsync"
|
|
|
|
# indefinitely for older versions to be able to update https://github.com/AppImage/AppImageSpec/blob/master/draft.md#github-releases
|
2022-01-06 11:07:59 +08:00
|
|
|
- name: Rename appimage for release upload
|
|
|
|
if: contains(github.ref, 'refs/tags/v')
|
|
|
|
run: |
|
|
|
|
cp qTox-*.x86_64.AppImage qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.AppImage
|
|
|
|
sha256sum qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.AppImage > qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.AppImage.sha256
|
|
|
|
cp qTox-*.x86_64.AppImage.zsync qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.AppImage.zsync
|
|
|
|
- name: Upload to versioned release
|
|
|
|
if: contains(github.ref, 'refs/tags/v')
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
draft: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.AppImage,qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.AppImage.sha256,qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.AppImage.zsync"
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Rename artifact for nightly upload
|
2022-01-06 11:07:59 +08:00
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
2022-02-26 08:34:28 +08:00
|
|
|
run: |
|
|
|
|
cp qTox-*.x86_64.AppImage qTox-nightly.x86_64.AppImage
|
|
|
|
cp qTox-*.x86_64.AppImage.zsync qTox-nightly.x86_64.AppImage.zsync
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Upload to nightly release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
tag: nightly
|
2022-02-21 17:07:58 +08:00
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
omitNameDuringUpdate: true
|
2022-01-06 04:00:16 +08:00
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-02-21 16:49:09 +08:00
|
|
|
artifacts: "qTox-nightly.x86_64.AppImage,qTox-nightly.x86_64.AppImage.zsync"
|
2021-11-08 13:27:45 +08:00
|
|
|
build-flatpak:
|
|
|
|
name: Flatpak
|
|
|
|
runs-on: ubuntu-latest
|
2022-01-06 04:00:16 +08:00
|
|
|
needs: [build-flatpak-docker, update-nightly-tag]
|
|
|
|
if: |
|
|
|
|
always() &&
|
|
|
|
needs.build-flatpak-docker.result == 'success' &&
|
|
|
|
(needs.update-nightly-tag.result == 'success' ||
|
|
|
|
needs.update-nightly-tag.result == 'skipped')
|
2022-01-10 16:01:32 +08:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2021-11-08 13:27:45 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
|
|
|
docker_image_name: flatpak
|
|
|
|
- name: Run build
|
2022-02-15 22:49:15 +08:00
|
|
|
run: docker-compose run --rm flatpak ./flatpak/build.sh
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Upload flatpak
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: qTox-${{ github.sha }}.x86_64.flatpak
|
|
|
|
path: qtox.flatpak
|
2022-01-06 11:07:59 +08:00
|
|
|
- name: Get tag name for flatpak release file name
|
|
|
|
if: contains(github.ref, 'refs/tags/v')
|
|
|
|
id: get_version
|
|
|
|
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
|
|
|
|
- name: Rename flatpak for release upload
|
|
|
|
if: contains(github.ref, 'refs/tags/v')
|
|
|
|
run: |
|
|
|
|
cp qtox.flatpak qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.flatpak
|
|
|
|
sha256sum qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.flatpak > qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.flatpak.sha256
|
|
|
|
- name: Upload to versioned release
|
|
|
|
if: contains(github.ref, 'refs/tags/v')
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
draft: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.flatpak,qTox-${{ steps.get_version.outputs.VERSION }}.x86_64.flatpak.sha256"
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Rename artifact for nightly upload
|
2022-01-06 11:07:59 +08:00
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
2022-03-06 11:38:21 +08:00
|
|
|
run: |
|
|
|
|
cp qtox.flatpak qTox-nightly.flatpak
|
|
|
|
sha256sum qTox-nightly.flatpak > qTox-nightly.flatpak.sha256
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Upload to nightly release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
tag: nightly
|
2022-02-21 17:07:58 +08:00
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
omitNameDuringUpdate: true
|
2022-01-06 04:00:16 +08:00
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-06 11:38:21 +08:00
|
|
|
artifacts: "qTox-nightly.flatpak,qTox-nightly.flatpak.sha256"
|
2021-11-08 13:27:45 +08:00
|
|
|
build-windows:
|
|
|
|
name: Windows
|
|
|
|
runs-on: ubuntu-latest
|
2022-01-06 04:00:16 +08:00
|
|
|
needs: [build-windows-docker, update-nightly-tag]
|
|
|
|
if: |
|
|
|
|
always() &&
|
|
|
|
needs.build-windows-docker.result == 'success' &&
|
|
|
|
(needs.update-nightly-tag.result == 'success' ||
|
|
|
|
needs.update-nightly-tag.result == 'skipped')
|
2022-01-10 16:01:32 +08:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2021-11-08 13:27:45 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
build_type: [debug, release]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
|
|
|
docker_image_name: windows_builder
|
|
|
|
- name: Run build
|
2022-01-10 04:55:55 +08:00
|
|
|
run: docker-compose run --rm windows_builder ./windows/cross-compile/build.sh --arch x86_64 --build-type ${{ matrix.build_type }} --run-tests --src-dir /qtox
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Upload installer
|
2022-03-03 02:52:02 +08:00
|
|
|
if: matrix.build_type == 'release'
|
2021-11-08 13:27:45 +08:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: setup-qtox-x86_64-${{ matrix.build_type }}.exe
|
|
|
|
path: package-prefix/setup-qtox.exe
|
|
|
|
- name: Upload zip
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-02-18 03:35:47 +08:00
|
|
|
name: qtox-x86_64-${{ matrix.build_type }}.zip
|
2022-01-06 04:03:39 +08:00
|
|
|
path: install-prefix/qtox-x86_64-${{ matrix.build_type }}.zip
|
2022-01-06 11:07:59 +08:00
|
|
|
- name: Rename exe for release upload
|
|
|
|
if: contains(github.ref, 'refs/tags/v') && matrix.build_type == 'release'
|
|
|
|
run: |
|
|
|
|
cp package-prefix/setup-qtox.exe setup-qtox-x86_64-release.exe
|
|
|
|
sha256sum setup-qtox-x86_64-release.exe > setup-qtox-x86_64-release.exe.sha256
|
|
|
|
- name: Upload to versioned release
|
|
|
|
if: contains(github.ref, 'refs/tags/v') && matrix.build_type == 'release'
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
draft: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "setup-qtox-x86_64-release.exe,setup-qtox-x86_64-release.exe.sha256"
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Rename zip for nightly upload
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
2022-03-06 11:38:21 +08:00
|
|
|
run: |
|
|
|
|
cp install-prefix/qtox-x86_64-${{ matrix.build_type }}.zip qtox-nightly-x86_64-${{ matrix.build_type }}.zip
|
|
|
|
sha256sum qtox-nightly-x86_64-${{ matrix.build_type }}.zip > qtox-nightly-x86_64-${{ matrix.build_type }}.zip.sha256
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Upload zip to nightly release
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
tag: nightly
|
2022-02-21 17:07:58 +08:00
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
omitNameDuringUpdate: true
|
2022-01-06 04:00:16 +08:00
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-06 11:38:21 +08:00
|
|
|
artifacts: "qtox-nightly-x86_64-${{ matrix.build_type }}.zip,qtox-nightly-x86_64-${{ matrix.build_type }}.zip.sha256"
|
|
|
|
- name: Rename exe for nightly upload
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.build_type == 'release'
|
|
|
|
run: |
|
|
|
|
cp package-prefix/setup-qtox.exe qtox-nightly-x86_64-${{ matrix.build_type }}.exe
|
|
|
|
sha256sum qtox-nightly-x86_64-${{ matrix.build_type }}.exe > qtox-nightly-x86_64-${{ matrix.build_type }}.exe.sha256
|
|
|
|
- name: Upload exe to nightly release
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.build_type == 'release'
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
tag: nightly
|
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
omitNameDuringUpdate: true
|
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "qtox-nightly-x86_64-${{ matrix.build_type }}.exe,qtox-nightly-x86_64-${{ matrix.build_type }}.exe.sha256"
|
2021-11-08 13:27:45 +08:00
|
|
|
build-windows-i686:
|
|
|
|
name: Windows i686
|
|
|
|
runs-on: ubuntu-latest
|
2022-01-06 04:00:16 +08:00
|
|
|
needs: [build-windows-i686-docker, update-nightly-tag]
|
|
|
|
if: |
|
|
|
|
always() &&
|
|
|
|
needs.build-windows-i686-docker.result == 'success' &&
|
|
|
|
(needs.update-nightly-tag.result == 'success' ||
|
|
|
|
needs.update-nightly-tag.result == 'skipped')
|
2022-01-10 16:01:32 +08:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2021-11-08 13:27:45 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
build_type: [debug, release]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./.github/actions/load-docker-image
|
|
|
|
name: Load docker image
|
|
|
|
with:
|
|
|
|
docker_image_name: windows_builder.i686
|
|
|
|
- name: Run build
|
2022-01-10 04:55:55 +08:00
|
|
|
run: docker-compose run --rm windows_builder.i686 ./windows/cross-compile/build.sh --arch i686 --build-type ${{ matrix.build_type }} --run-tests --src-dir /qtox
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Upload installer
|
2022-03-03 02:52:02 +08:00
|
|
|
if: matrix.build_type == 'release'
|
2021-11-08 13:27:45 +08:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: setup-qtox-i686-${{ matrix.build_type }}.exe
|
|
|
|
path: package-prefix/setup-qtox.exe
|
|
|
|
- name: Upload zip
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-02-18 03:35:47 +08:00
|
|
|
name: qtox-i686-${{ matrix.build_type }}.zip
|
2022-01-06 04:03:39 +08:00
|
|
|
path: install-prefix/qtox-i686-${{ matrix.build_type }}.zip
|
2022-01-06 11:07:59 +08:00
|
|
|
- name: Rename exe for release upload
|
|
|
|
if: contains(github.ref, 'refs/tags/v') && matrix.build_type == 'release'
|
|
|
|
run: |
|
|
|
|
cp package-prefix/setup-qtox.exe setup-qtox-i686-release.exe
|
|
|
|
sha256sum setup-qtox-i686-release.exe > setup-qtox-i686-release.exe.sha256
|
|
|
|
- name: Upload to versioned release
|
|
|
|
if: contains(github.ref, 'refs/tags/v') && matrix.build_type == 'release'
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
draft: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "setup-qtox-i686-release.exe,setup-qtox-i686-release.exe.sha256"
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Rename zip for nightly upload
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
2022-03-06 11:38:21 +08:00
|
|
|
run: |
|
|
|
|
cp install-prefix/qtox-i686-${{ matrix.build_type }}.zip qtox-nightly-i686-${{ matrix.build_type }}.zip
|
|
|
|
sha256sum qtox-nightly-i686-${{ matrix.build_type }}.zip > qtox-nightly-i686-${{ matrix.build_type }}.zip.sha256
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Upload zip to nightly release
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
tag: nightly
|
2022-02-21 17:07:58 +08:00
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
omitNameDuringUpdate: true
|
2022-01-06 04:00:16 +08:00
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-06 11:38:21 +08:00
|
|
|
artifacts: "qtox-nightly-i686-${{ matrix.build_type }}.zip,qtox-nightly-i686-${{ matrix.build_type }}.zip.sha256"
|
|
|
|
- name: Rename exe for nightly upload
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.build_type == 'release'
|
|
|
|
run: |
|
|
|
|
cp package-prefix/setup-qtox.exe qtox-nightly-i686-${{ matrix.build_type }}.exe
|
|
|
|
sha256sum qtox-nightly-i686-${{ matrix.build_type }}.exe > qtox-nightly-i686-${{ matrix.build_type }}.exe.sha256
|
|
|
|
- name: Upload exe to nightly release
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.build_type == 'release'
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
tag: nightly
|
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
omitNameDuringUpdate: true
|
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "qtox-nightly-i686-${{ matrix.build_type }}.exe,qtox-nightly-i686-${{ matrix.build_type }}.exe.sha256"
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
build-osx:
|
|
|
|
name: macOS
|
|
|
|
runs-on: macos-10.15
|
2022-01-06 04:00:16 +08:00
|
|
|
needs: update-nightly-tag
|
|
|
|
if: |
|
|
|
|
always() &&
|
|
|
|
(needs.update-nightly-tag.result == 'success' ||
|
|
|
|
needs.update-nightly-tag.result == 'skipped')
|
2022-01-10 16:01:32 +08:00
|
|
|
permissions:
|
|
|
|
contents: write
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: homebrew
|
|
|
|
run: brew upgrade && brew bundle --file ./osx/Brewfile
|
2022-01-05 03:11:09 +08:00
|
|
|
- name: Install toxcore and toxext
|
|
|
|
run: buildscripts/build_toxcore_linux.sh
|
|
|
|
- name: Build qTox
|
2022-03-09 10:55:53 +08:00
|
|
|
run: ./.ci-scripts/build-osx.sh --run-tests
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Upload dmg
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: qTox-${{ github.sha }}.dmg
|
2022-01-05 03:11:09 +08:00
|
|
|
path: qTox.dmg
|
2022-01-06 11:07:59 +08:00
|
|
|
- name: Create shasum for versioned release
|
|
|
|
if: contains(github.ref, 'refs/tags/v')
|
|
|
|
run: sha256sum qTox.dmg > qTox.dmg.sha256
|
|
|
|
- name: Upload to versioned release
|
|
|
|
if: contains(github.ref, 'refs/tags/v')
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
draft: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "qTox.dmg,qTox.dmg.sha256"
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Rename artifact for nightly upload
|
2022-01-06 11:07:59 +08:00
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
2022-03-06 11:38:21 +08:00
|
|
|
run: |
|
|
|
|
cp qTox.dmg qTox-nightly.dmg
|
|
|
|
sha256sum qTox-nightly.dmg > qTox-nightly.dmg.sha256
|
2022-01-06 04:00:16 +08:00
|
|
|
- name: Upload to nightly release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
|
|
|
tag: nightly
|
2022-02-21 17:07:58 +08:00
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
omitNameDuringUpdate: true
|
2022-01-06 04:00:16 +08:00
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-06 11:38:21 +08:00
|
|
|
artifacts: "qTox-nightly.dmg,qTox-nightly.dmg.sha256"
|
2021-11-08 13:27:45 +08:00
|
|
|
build-docs:
|
|
|
|
name: Docs
|
2022-02-22 00:03:11 +08:00
|
|
|
runs-on: ubuntu-latest
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
env:
|
2021-11-08 13:27:45 +08:00
|
|
|
DOXYGEN_CONFIG_FILE: doxygen.conf
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-02-17 00:13:32 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
- name: Run
|
2022-02-17 00:11:27 +08:00
|
|
|
run: ./.ci-scripts/build-docs.sh
|
2022-02-22 00:42:40 +08:00
|
|
|
- name: Deploy
|
2022-03-03 19:58:01 +08:00
|
|
|
if: github.ref == 'refs/heads/master' && github.owner == 'qTox'
|
2022-02-22 00:42:40 +08:00
|
|
|
env:
|
2022-02-24 21:50:07 +08:00
|
|
|
access_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }}
|
2022-02-22 00:42:40 +08:00
|
|
|
run: ./.ci-scripts/deploy-docs.sh
|
2021-11-08 13:27:45 +08:00
|
|
|
build-gitstats:
|
|
|
|
name: Gitstats
|
2022-02-22 00:03:11 +08:00
|
|
|
runs-on: ubuntu-latest
|
2021-09-23 18:10:11 +08:00
|
|
|
env:
|
2021-11-08 13:27:45 +08:00
|
|
|
GITSTATS_DIR: gitstats
|
2021-09-23 18:10:11 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-02-19 15:57:45 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Install gitstats
|
2022-02-22 00:03:11 +08:00
|
|
|
run: |
|
2022-03-10 11:30:39 +08:00
|
|
|
sudo apt-get update && sudo apt-get install --no-install-recommends gnuplot
|
2022-02-22 00:03:11 +08:00
|
|
|
git clone git://github.com/hoxu/gitstats.git
|
|
|
|
cd gitstats
|
|
|
|
sudo make install
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Run
|
2022-02-17 00:11:27 +08:00
|
|
|
run: ./.ci-scripts/build-gitstats.sh
|
2022-02-17 00:55:08 +08:00
|
|
|
- name: Deploy
|
2022-03-03 19:58:01 +08:00
|
|
|
if: github.ref == 'refs/heads/master' && github.owner == 'qTox'
|
2022-02-17 00:55:08 +08:00
|
|
|
env:
|
|
|
|
access_key: ${{ secrets.GITSTATS_DEPLOY_KEY }}
|
2022-02-17 00:11:27 +08:00
|
|
|
run: ./.ci-scripts/deploy-gitstats.sh
|