Skip to content

Commit

Permalink
Use " instead if ' in CI yaml files and use fail-fast. true everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Dec 28, 2023
1 parent afb0bf3 commit b29c494
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 31 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: CodeQL

on:
push:
branches: [ "v3" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "v3" ]
schedule:
- cron: '37 9 * * 5'
on: [push, pull_request]

concurrency:
# Cancel a currently running workflow from the same PR, branch or tag when a
# new workflow is triggered.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
analyze:
Expand All @@ -32,8 +31,8 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'javascript', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
language: [ "cpp", "javascript", "python" ]
# CodeQL supports [ "cpp", "csharp", "go", "java", "javascript", "python", "ruby" ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/mediasoup-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
ci:
strategy:
matrix:
fail-fast: true
ci:
- os: ubuntu-20.04
node: 16
Expand All @@ -27,7 +28,7 @@ jobs:
runs-on: ${{ matrix.ci.os }}

env:
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true'
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: "true"

steps:
- name: Checkout
Expand All @@ -43,7 +44,7 @@ jobs:
with:
path: |
~/.npm
key: ${{ matrix.ci.os }}-node-${{ hashFiles('**/package.json') }}
key: ${{ matrix.ci.os }}-node-${{ hashFiles("**/package.json") }}
restore-keys: |
${{ matrix.ci.os }}-node-
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/mediasoup-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
jobs:
ci:
strategy:
fail-fast: true
matrix:
os:
- ubuntu-20.04
Expand All @@ -24,7 +25,7 @@ jobs:
runs-on: ${{ matrix.os }}

env:
KEEP_BUILD_ARTIFACTS: '1'
KEEP_BUILD_ARTIFACTS: "1"

steps:
- name: Checkout
Expand All @@ -36,7 +37,7 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
key: ${{ matrix.os }}-cargo-${{ hashFiles("**/Cargo.toml") }}

- name: cargo fmt
run: cargo fmt --all -- --check
Expand All @@ -50,6 +51,6 @@ jobs:
- name: cargo doc
run: cargo doc --locked --all --no-deps --lib
env:
DOCS_RS: '1'
RUSTDOCFLAGS: '-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links'
DOCS_RS: "1"
RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links"

16 changes: 8 additions & 8 deletions .github/workflows/mediasoup-worker-prebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
ci:
strategy:
fail-fast: false
fail-fast: true
matrix:
build:
# For Linux let's use an old version of Ubuntu (20.04) that builds the
Expand Down Expand Up @@ -46,36 +46,36 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, "refs/tags/")

- name: Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, "refs/tags/")

# We need to install some NPM production deps for npm-scripts.mjs to work.
- name: npm ci --ignore-scripts
run: npm ci --ignore-scripts --omit=dev --foreground-scripts
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, "refs/tags/")

# However we also need to install pip invoke manually (since
# `--ignore-scripts` prevented invoke from being installed).
- name: pip3 install invoke
run: pip3 install invoke
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, "refs/tags/")

- name: npm run worker:build
run: npm run worker:build
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, "refs/tags/")

# Publish prebuild binaries on tag.
- name: npm run worker:prebuild
run: npm run worker:prebuild
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, "refs/tags/")

- name: Upload mediasoup-worker prebuilt binary
uses: softprops/action-gh-release@v1
with:
files: worker/prebuild/mediasoup-worker-*.tgz
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, "refs/tags/")
12 changes: 6 additions & 6 deletions .github/workflows/mediasoup-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
jobs:
ci:
strategy:
fail-fast: false
fail-fast: true
matrix:
build:
- os: ubuntu-20.04
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
env:
CC: ${{ matrix.build.cc }}
CXX: ${{ matrix.build.cxx }}
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true'
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: "true"

steps:
- name: Checkout
Expand All @@ -60,7 +60,7 @@ jobs:
with:
path: |
~/.npm
key: ${{ matrix.build.os }}-node-${{matrix.build.cc}}-${{ hashFiles('**/package.json') }}
key: ${{ matrix.build.os }}-node-${{matrix.build.cc}}-${{ hashFiles("**/package.json") }}
restore-keys: |
${{ matrix.build.os }}-node-${{matrix.build.cc}}-
Expand All @@ -72,17 +72,17 @@ jobs:
- name: npm ci --prefix worker/scripts
run: npm ci --prefix worker/scripts --foreground-scripts
# TODO: Maybe fix this one day.
if: runner.os != 'Windows'
if: runner.os != "Windows"

- name: invoke -r worker lint
run: invoke -r worker lint
# TODO: Maybe fix this one day.
if: runner.os != 'Windows'
if: runner.os != "Windows"

- name: invoke -r worker mediasoup-worker
run: invoke -r worker mediasoup-worker

- name: invoke -r worker test
run: invoke -r worker test
# TODO: Maybe fix this one day.
if: runner.os != 'Windows'
if: runner.os != "Windows"

0 comments on commit b29c494

Please sign in to comment.