diff --git a/.github/workflows/build-gitahead-mac.yml b/.github/workflows/build-gitahead-mac.yml deleted file mode 100644 index 4a1f91ee..00000000 --- a/.github/workflows/build-gitahead-mac.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Build GitAhead (Mac) -on: [push] -jobs: - build: - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - name: Initialize Submodules - uses: snickerbockers/submodules-init@v4 - - name: Build OpensSSL - run: | - cd dep/openssl/openssl - ./Configure darwin64-x86_64-cc no-shared - make - - name: Install Ninja - uses: seanmiddleditch/gha-setup-ninja@v1 - with: - version: 1.9.0 - platform: mac # [win, mac, linux] - destination: ninja - - name: Install Qt - uses: jurplel/install-qt-action@v2.2.0 - with: - version: 5.12.5 - target: desktop - host: mac - install-deps: true - modules: qtwebengine - - name: Configure Release - 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 - run: | - cd build/release - echo "TODO: Disable ui tests in headless environment or find a way to send tests to an external browser, ninja check" - #ninja check diff --git a/.github/workflows/build-master.yml b/.github/workflows/build-master.yml new file mode 100644 index 00000000..8300c7ec --- /dev/null +++ b/.github/workflows/build-master.yml @@ -0,0 +1,108 @@ +# 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: GitAhead (master) +on: + push: + branches: + - master +jobs: + 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@v1 + - name: Install NASM + if: matrix.env.name == 'win' + uses: ilammy/setup-nasm@v1.0.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@v1 + with: + version: 1.9.0 + platform: ${{ matrix.env.ninja_platform }} + destination: ninja + - name: Install Qt + uses: jurplel/install-qt-action@v2.2.0 + timeout-minutes: 10 + with: + version: 5.12.5 + 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 +... \ No newline at end of file diff --git a/.github/workflows/build-stage.yml b/.github/workflows/build-stage.yml new file mode 100644 index 00000000..ae793a56 --- /dev/null +++ b/.github/workflows/build-stage.yml @@ -0,0 +1,109 @@ +# Development CI Script +# +# This script kicks off a build for every event exculding commits pushed to the +# master branch. This includes pull requests and page builds to any branch. +--- +name: GitAhead (stage) +on: + push: + branches-ignore: + - master + pull_request: + page_build: +jobs: + 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@v1 + - name: Install NASM + if: matrix.env.name == 'win' + uses: ilammy/setup-nasm@v1.0.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@v1 + with: + version: 1.9.0 + platform: ${{ matrix.env.ninja_platform }} + destination: ninja + - name: Install Qt + uses: jurplel/install-qt-action@v2.2.0 + timeout-minutes: 10 + with: + version: 5.12.5 + 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 +... \ No newline at end of file diff --git a/README.md b/README.md index 8023e6a8..8e9dc0f4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![Actions Status](https://github.com/gitahead/gitahead/workflows/GitAhead%20%28master%29/badge.svg)](https://github.com/gitahead/gitahead/actions) [![Actions Status](https://github.com/gitahead/gitahead/workflows/GitAhead%20%28stage%29/badge.svg)](https://github.com/gitahead/gitahead/actions) + + GitAhead - Understand Your History ==================================