Skip to content

Commit

Permalink
Added logic to run on pull_request and push, but to skip test instead…
Browse files Browse the repository at this point in the history
… of (#136)

running double when not forked

Co-authored-by: lwwilkov <[email protected]>
  • Loading branch information
lwilkovich and lwwilkov authored Apr 14, 2021
1 parent 4cdaced commit 91bb420
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

env:
PACKAGE_NAME: aws-iot-device-client

jobs:
update-doxygen:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: ((github.event_name == 'push') && (github.ref == 'refs/heads/main'))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -39,6 +42,7 @@ jobs:

build-ubuntu-16-x64:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -68,6 +72,7 @@ jobs:
build-amazonlinux:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -81,6 +86,7 @@ jobs:
build-rhel-ubi8:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -110,6 +116,7 @@ jobs:
gpp-compat:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
strategy:
matrix:
version: [ 5,6,7,8 ]
Expand All @@ -126,6 +133,7 @@ jobs:
clangpp-compat:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
strategy:
matrix:
version: [ 5.0, 6.0, 7, 8, 9 ]
Expand All @@ -142,6 +150,7 @@ jobs:
build-armhf32:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -171,6 +180,7 @@ jobs:
build-mips32:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -200,6 +210,7 @@ jobs:
build-aarch64:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -229,6 +240,7 @@ jobs:
build-shared-libs-ubuntu-16-x64:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -266,6 +278,7 @@ jobs:
build-shared-libs-amazonlinux:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -279,6 +292,7 @@ jobs:
build-shared-libs-rhel-ubi8:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -316,6 +330,7 @@ jobs:
build-shared-libs-armhf32:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -353,6 +368,7 @@ jobs:
build-shared-libs-mips32:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -390,6 +406,7 @@ jobs:
build-shared-libs-aarch64:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -427,6 +444,7 @@ jobs:
build-st-ubuntu-16-x64:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -448,6 +466,7 @@ jobs:
build-st-ubuntu-16-aarch64:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -469,6 +488,7 @@ jobs:
build-st-ubuntu-16-armhf32:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- uses: actions/checkout@v2
with:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: Lint

on: [push]
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
clang-format:

runs-on: ubuntu-latest

if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- name: Checkout Sources
uses: actions/checkout@v1
Expand Down

0 comments on commit 91bb420

Please sign in to comment.