Skip to content

Commit cdd46fb

Browse files
author
Hakan Kaya
committed
ci: reduce GitHub Actions usage
1 parent 8091517 commit cdd46fb

3 files changed

Lines changed: 53 additions & 33 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,31 @@ updates:
44
directory: /
55
schedule:
66
interval: weekly
7+
open-pull-requests-limit: 2
8+
groups:
9+
cargo-dependencies:
10+
patterns:
11+
- "*"
12+
713
- package-ecosystem: npm
814
directory: /apps/vds-web
915
schedule:
1016
interval: weekly
17+
open-pull-requests-limit: 2
18+
groups:
19+
web-dependencies:
20+
patterns:
21+
- "*"
22+
1123
- package-ecosystem: github-actions
1224
directory: /
1325
schedule:
1426
interval: weekly
27+
open-pull-requests-limit: 2
28+
groups:
29+
actions-dependencies:
30+
patterns:
31+
- "*"
32+
# CodeQL is manual-only while code scanning is unavailable on this private repo.
33+
ignore:
34+
- dependency-name: github/codeql-action

‎.github/workflows/ci.yml‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@ name: Build and Test
22

33
on:
44
push:
5+
paths-ignore:
6+
- "docs/**"
7+
- "**/*.md"
8+
- "LICENSE"
59
pull_request:
10+
paths-ignore:
11+
- "docs/**"
12+
- "**/*.md"
13+
- "LICENSE"
614

715
permissions:
816
contents: read
917

1018
concurrency:
11-
group: ci-${{ github.ref }}
19+
group: ci-${{ github.event.pull_request.head.ref || github.ref_name }}
1220
cancel-in-progress: true
1321

1422
jobs:
@@ -50,17 +58,9 @@ jobs:
5058
- run: npm run test:run
5159
- run: npm run build
5260

53-
native-adapters:
54-
name: Native adapters (${{ matrix.name }})
61+
native-and-examples:
62+
name: Native adapters and C examples
5563
runs-on: ubuntu-latest
56-
strategy:
57-
fail-fast: false
58-
matrix:
59-
include:
60-
- name: default
61-
c_flags: ""
62-
- name: asan-ubsan
63-
c_flags: "-fsanitize=address,undefined -fno-omit-frame-pointer -g"
6464
steps:
6565
- uses: actions/checkout@v4
6666
- name: Install build dependencies
@@ -69,27 +69,27 @@ jobs:
6969
sudo apt-get install -y --no-install-recommends cmake pkg-config build-essential libfuse3-dev
7070
- name: Build and test adapters
7171
env:
72-
CFLAGS_EXTRA: ${{ matrix.c_flags }}
7372
ASAN_OPTIONS: detect_leaks=1
7473
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1
7574
run: |
7675
set -eu
77-
for adapter in spi-cuse i2c-cuse gpio-sim uart-pty; do
78-
echo "::group::$adapter"
79-
cmake -S "adapters/$adapter" -B "$RUNNER_TEMP/build-$adapter" \
80-
-DCMAKE_BUILD_TYPE=Debug \
81-
-DCMAKE_C_FLAGS="$CFLAGS_EXTRA" \
82-
-DCMAKE_EXE_LINKER_FLAGS="$CFLAGS_EXTRA"
83-
cmake --build "$RUNNER_TEMP/build-$adapter" --parallel
84-
ctest --test-dir "$RUNNER_TEMP/build-$adapter" --output-on-failure
85-
echo "::endgroup::"
76+
for variant in default asan-ubsan; do
77+
case "$variant" in
78+
default) flags="" ;;
79+
asan-ubsan) flags="-fsanitize=address,undefined -fno-omit-frame-pointer -g" ;;
80+
esac
81+
for adapter in spi-cuse i2c-cuse gpio-sim uart-pty; do
82+
echo "::group::$variant / $adapter"
83+
build_dir="$RUNNER_TEMP/build-$variant-$adapter"
84+
cmake -S "adapters/$adapter" -B "$build_dir" \
85+
-DCMAKE_BUILD_TYPE=Debug \
86+
-DCMAKE_C_FLAGS="$flags" \
87+
-DCMAKE_EXE_LINKER_FLAGS="$flags"
88+
cmake --build "$build_dir" --parallel
89+
ctest --test-dir "$build_dir" --output-on-failure
90+
echo "::endgroup::"
91+
done
8692
done
87-
88-
examples:
89-
name: Embedded C examples
90-
runs-on: ubuntu-latest
91-
steps:
92-
- uses: actions/checkout@v4
9393
- name: Build example applications
9494
run: |
9595
set -eu
@@ -112,6 +112,6 @@ jobs:
112112
name: Device ABI integration (disabled)
113113
if: false
114114
runs-on: ubuntu-latest
115-
needs: [rust, native-adapters]
115+
needs: [rust, native-and-examples]
116116
steps:
117117
- run: echo "TODO - see comment above"

‎.github/workflows/codeql.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: CodeQL
22

3+
# Automatic CodeQL runs are intentionally disabled while this private repository
4+
# does not have GitHub code scanning enabled. Keeping it on push/PR/schedule only
5+
# burns Actions minutes and fails when SARIF upload is rejected.
6+
# Enable code scanning first, then restore the automatic triggers below.
37
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
schedule:
8-
- cron: "17 4 * * 1"
8+
workflow_dispatch:
99

1010
# CodeQL does not support Rust by default; Rust is covered by clippy in CI.
1111
jobs:

0 commit comments

Comments
 (0)