mirror of
https://github.com/PabloMK7/citra
synced 2024-11-15 05:08:23 +00:00
CI: Decouple clang-format from the linux build matrix (#5838)
This commit is contained in:
parent
a1b4daa9d4
commit
4817b00843
2 changed files with 16 additions and 5 deletions
|
@ -10,9 +10,9 @@ fi
|
||||||
CLANG_FORMAT=clang-format-10
|
CLANG_FORMAT=clang-format-10
|
||||||
$CLANG_FORMAT --version
|
$CLANG_FORMAT --version
|
||||||
|
|
||||||
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
|
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
|
||||||
# Get list of every file modified in this pull request
|
# Get list of every file modified in this pull request
|
||||||
files_to_lint="$(git diff --name-only --diff-filter=ACMRTUXB $TRAVIS_COMMIT_RANGE | grep '^src/[^.]*[.]\(cpp\|h\)$' || true)"
|
files_to_lint="$(git diff --name-only --diff-filter=ACMRTUXB $COMMIT_RANGE | grep '^src/[^.]*[.]\(cpp\|h\)$' || true)"
|
||||||
else
|
else
|
||||||
# Check everything for branch pushes
|
# Check everything for branch pushes
|
||||||
files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h')"
|
files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h')"
|
||||||
|
|
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
|
@ -8,11 +8,22 @@ on:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
clang-format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: citraemu/build-environments:linux-clang-format
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||||
|
run: ./.ci/linux-clang-format/docker.sh
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
image: ["linux-clang-format", "linux-fresh", "linux-frozen", "linux-mingw"]
|
image: ["linux-fresh", "linux-frozen", "linux-mingw"]
|
||||||
container: citraemu/build-environments:${{ matrix.image }}
|
container: citraemu/build-environments:${{ matrix.image }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -34,12 +45,12 @@ jobs:
|
||||||
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
||||||
- name: Pack
|
- name: Pack
|
||||||
run: ./.ci/${{ matrix.image }}/upload.sh
|
run: ./.ci/${{ matrix.image }}/upload.sh
|
||||||
if: ${{ matrix.image != 'linux-frozen' && matrix.image != 'linux-clang-format' }}
|
if: ${{ matrix.image != 'linux-frozen' }}
|
||||||
env:
|
env:
|
||||||
NAME: ${{ matrix.image }}
|
NAME: ${{ matrix.image }}
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
if: ${{ matrix.image != 'linux-frozen' && matrix.image != 'linux-clang-format' }}
|
if: ${{ matrix.image != 'linux-frozen' }}
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.image }}
|
name: ${{ matrix.image }}
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
|
|
Loading…
Reference in a new issue