mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-02 16:49:04 +00:00
87 lines
2.4 KiB
YAML
87 lines
2.4 KiB
YAML
name: threeSD-ci
|
|
|
|
on:
|
|
push:
|
|
branches: [ "*" ]
|
|
tags: [ "*" ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
image: ["linux-clang-format", "linux-fresh"]
|
|
container: darkk98/threesd:${{ matrix.image }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- name: Set up cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.ccache
|
|
key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-${{ matrix.image }}-
|
|
- name: Query tag name
|
|
uses: little-core-labs/get-git-tag@v3.0.2
|
|
id: tagName
|
|
- name: Build
|
|
run: ./.ci/${{ matrix.image }}/docker.sh
|
|
- name: Pack
|
|
run: ./.ci/${{ matrix.image }}/upload.sh
|
|
if: ${{ matrix.image != 'linux-clang-format' }}
|
|
env:
|
|
NAME: ${{ matrix.image }}
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v2
|
|
if: ${{ matrix.image != 'linux-mingw' && matrix.image != 'linux-clang-format' }}
|
|
with:
|
|
name: ${{ matrix.image }}
|
|
path: artifacts/
|
|
macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- name: Set up cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/Library/Caches/ccache
|
|
key: ${{ runner.os }}-macos-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-macos-
|
|
- name: Query tag name
|
|
uses: little-core-labs/get-git-tag@v3.0.2
|
|
id: tagName
|
|
- name: Install dependencies
|
|
run: ./.ci/macos/deps.sh
|
|
- name: Build
|
|
run: ./.ci/macos/build.sh
|
|
env:
|
|
MACOSX_DEPLOYMENT_TARGET: "10.13"
|
|
- name: Pack
|
|
run: ./.ci/macos/upload.sh
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: macos
|
|
path: artifacts/
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: [build, macos]
|
|
steps:
|
|
- uses: actions/download-artifact@v2
|
|
- name: Query tag name
|
|
uses: little-core-labs/get-git-tag@v3.0.2
|
|
id: tagName
|
|
- name: Upload artifacts
|
|
uses: alexellis/upload-assets@0.2.3
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
asset_paths: '["./**/*.zip"]'
|