mirror of
https://github.com/Murmele/Gittyup.git
synced 2024-10-26 10:39:20 +03:00
139 lines
4.2 KiB
YAML
139 lines
4.2 KiB
YAML
# Production CI Script
|
|
#
|
|
# Triggers a full build of GitAhead when a new commit is pushed to master.
|
|
# The build status badge can be accessed at:
|
|
# https://github.com/gitahead/gitahead/workflows/GitAhead%20%28master%29/badge.svg
|
|
---
|
|
name: Gittyup (master)
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
flatpak:
|
|
name: "Flatpak"
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-21.08
|
|
options: --privileged
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Clone flatpak manifest from Flathub
|
|
uses: GuillaumeFalourd/clone-github-repo-action@v1
|
|
with:
|
|
owner: 'flathub'
|
|
repository: 'com.github.Murmele.Gittyup'
|
|
- run: >
|
|
sed -i 's/tag:\ gittyup_v[1-9]*\.[0-9]*\.[0-9]*/commit: '$GITHUB_SHA'/' com.github.Murmele.Gittyup/com.github.Murmele.Gittyup.yml
|
|
- run: sed -i s@url:\ .*\.git@url:\ $GITHUB_SERVER_URL/$GITHUB_REPOSITORY@ com.github.Murmele.Gittyup/com.github.Murmele.Gittyup.yml
|
|
#- run: cat com.github.Murmele.Gittyup/com.github.Murmele.Gittyup.yml
|
|
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
|
|
with:
|
|
bundle: com.github.Murmele.Gittyup.flatpak
|
|
manifest-path: com.github.Murmele.Gittyup/com.github.Murmele.Gittyup.yml
|
|
cache: false
|
|
- name: Upload Flatpak package
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
path: com.github.Murmele.Gittyup.flatpak
|
|
retention-days: 20
|
|
build:
|
|
runs-on: ${{ matrix.env.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
env:
|
|
- name: linux
|
|
os: ubuntu-latest
|
|
ninja_platform: linux
|
|
qt_platform: linux
|
|
arch: linux-x86_64
|
|
cmake_env: {}
|
|
- name: mac
|
|
os: macos-latest
|
|
ninja_platform: mac
|
|
qt_platform: mac
|
|
arch: darwin64-x86_64-cc
|
|
cmake_env: {}
|
|
- name: win
|
|
os: windows-latest
|
|
ninja_platform: win
|
|
qt_platform: windows
|
|
arch: VC-WIN64A
|
|
cmake_env:
|
|
CC: cl
|
|
CXX: cl
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Initialize Submodules
|
|
uses: snickerbockers/submodules-init@v4
|
|
- name: Install Perl
|
|
if: matrix.env.name == 'win'
|
|
uses: shogo82148/actions-setup-perl@v1
|
|
with:
|
|
perl-version: '5.30'
|
|
- name: Install Nmake
|
|
if: matrix.env.name == 'win'
|
|
uses: seanmiddleditch/gha-setup-vsdevenv@v3
|
|
- name: Install NASM
|
|
if: matrix.env.name == 'win'
|
|
uses: ilammy/setup-nasm@v1.2.0
|
|
- name: Build OpenSSL (linux)
|
|
if: matrix.env.name == 'linux'
|
|
run: |
|
|
cd dep/openssl/openssl
|
|
./config -fPIC
|
|
make
|
|
- name: Build OpenSSL (mac)
|
|
if: matrix.env.name == 'mac'
|
|
run: |
|
|
cd dep/openssl/openssl
|
|
./Configure ${{ matrix.env.arch }} no-shared
|
|
make
|
|
- name: Build OpensSSL (win)
|
|
if: matrix.env.name == 'win'
|
|
run: |
|
|
cd dep/openssl/openssl
|
|
perl Configure VC-WIN64A
|
|
nmake
|
|
- name: Install Ninja
|
|
uses: seanmiddleditch/gha-setup-ninja@v3
|
|
with:
|
|
version: 1.9.0
|
|
platform: ${{ matrix.env.ninja_platform }}
|
|
destination: ninja
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2.13.0
|
|
timeout-minutes: 10
|
|
with:
|
|
version: 5.15.2
|
|
target: desktop
|
|
host: ${{ matrix.env.qtplatform }}
|
|
install-deps: true
|
|
modules: qtwebengine
|
|
- name: Configure Release
|
|
env: ${{ matrix.env.cmake_env }}
|
|
run: |
|
|
mkdir -p build/release
|
|
cd build/release
|
|
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ../..
|
|
- name: Build Information
|
|
run: |
|
|
echo "ninja version: $(ninja --version)"
|
|
git --version
|
|
qmake --version
|
|
cmake --version
|
|
- name: Build
|
|
run: |
|
|
cd build/release
|
|
ninja
|
|
- name: Test
|
|
continue-on-error: true
|
|
run: |
|
|
cd build/release
|
|
ninja check
|
|
...
|