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-15 22:49:15 +08:00
|
|
|
run: docker-compose run --rm almalinux ./.travis/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
|
2021-11-08 13:27:45 +08:00
|
|
|
build-fedora:
|
|
|
|
name: Fedora
|
|
|
|
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-02-15 22:49:15 +08:00
|
|
|
run: docker-compose run --rm fedora ./.travis/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
|
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-15 22:49:15 +08:00
|
|
|
run: docker-compose run --rm opensuse ./.travis/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-15 22:49:15 +08:00
|
|
|
run: docker-compose run --rm debian ./.travis/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-15 22:49:15 +08:00
|
|
|
run: docker-compose run --rm debian_old ./.travis/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
|
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-15 22:49:15 +08:00
|
|
|
run: docker-compose run --rm ubuntu_lts ./.travis/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-15 22:49:15 +08:00
|
|
|
docker-compose run --rm ubuntu_lts ./.travis/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)
|
|
|
|
- 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-01-06 04:00:16 +08:00
|
|
|
run: cp qTox-*.x86_64.AppImage qTox-nightly.x86_64.AppImage
|
|
|
|
- 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
|
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "qTox-nightly.x86_64.AppImage"
|
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-01-06 04:00:16 +08:00
|
|
|
run: cp qtox.flatpak qTox-nightly.flatpak
|
|
|
|
- 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
|
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "qTox-nightly.flatpak"
|
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
|
|
|
|
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:
|
|
|
|
name: setup-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 04:00:16 +08:00
|
|
|
if-no-files-found: ignore
|
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'
|
|
|
|
run: cp install-prefix/qtox-x86_64-${{ matrix.build_type }}.zip setup-qtox-nightly-x86_64-${{ matrix.build_type }}.zip
|
|
|
|
- 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
|
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "setup-qtox-nightly-x86_64-${{ matrix.build_type }}.zip"
|
|
|
|
- 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 setup-qtox-nightly-x86_64-release.exe
|
|
|
|
- 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
|
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "setup-qtox-nightly-x86_64-release.exe"
|
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
|
|
|
|
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:
|
|
|
|
name: setup-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 04:00:16 +08:00
|
|
|
if-no-files-found: ignore
|
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'
|
|
|
|
run: cp install-prefix/qtox-i686-${{ matrix.build_type }}.zip setup-qtox-nightly-i686-${{ matrix.build_type }}.zip
|
|
|
|
- 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
|
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "setup-qtox-nightly-i686-${{ matrix.build_type }}.zip"
|
|
|
|
- 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 setup-qtox-nightly-i686-release.exe
|
|
|
|
- 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
|
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "setup-qtox-nightly-i686-release.exe"
|
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
|
2022-01-06 04:00:16 +08:00
|
|
|
env:
|
|
|
|
TRAVIS: true
|
|
|
|
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
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
|
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: ./.travis/build-osx.sh
|
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-01-06 04:00:16 +08:00
|
|
|
run: cp qTox.dmg qTox-nightly.dmg
|
|
|
|
- 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
|
|
|
|
prerelease: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
artifacts: "qTox-nightly.dmg"
|
2021-11-08 13:27:45 +08:00
|
|
|
build-docs:
|
|
|
|
name: Docs
|
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
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
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
|
|
|
|
- name: Run
|
2021-11-08 13:27:45 +08:00
|
|
|
run: ./.travis/build-docs.sh
|
|
|
|
build-gitstats:
|
|
|
|
name: Gitstats
|
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
|
|
|
runs-on: ubuntu-18.04
|
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
|
2021-11-08 13:27:45 +08:00
|
|
|
- name: Install gitstats
|
|
|
|
run: sudo apt-get install gitstats
|
|
|
|
- name: Run
|
|
|
|
run: ./.travis/build-gitstats.sh
|