-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update lint scripts and CI configs.
- Loading branch information
Showing
81 changed files
with
734 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
PRE_TEST_HOOK=_install_gstreamer_hook | ||
PRE_LINT_HOOK=_install_gstreamer_hook | ||
|
||
function _install_gstreamer_hook(){ | ||
set -e | ||
|
||
sudo apt-get update | ||
sudo apt-get purge -y libunwind-14-dev | ||
sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
.goassets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this repository. | ||
# | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
set -eu | ||
|
||
SCRIPT_PATH="$(realpath "$(dirname "$0")")" | ||
GOASSETS_PATH="${SCRIPT_PATH}/.goassets" | ||
|
||
GOASSETS_REF=${GOASSETS_REF:-master} | ||
|
||
if [ -d "${GOASSETS_PATH}" ]; then | ||
if ! git -C "${GOASSETS_PATH}" diff --exit-code; then | ||
echo "${GOASSETS_PATH} has uncommitted changes" >&2 | ||
exit 1 | ||
fi | ||
git -C "${GOASSETS_PATH}" fetch origin | ||
git -C "${GOASSETS_PATH}" checkout ${GOASSETS_REF} | ||
git -C "${GOASSETS_PATH}" reset --hard origin/${GOASSETS_REF} | ||
else | ||
git clone -b ${GOASSETS_REF} https://github.com/pion/.goassets.git "${GOASSETS_PATH}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this repository. | ||
# | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
SCRIPT_PATH="$(realpath "$(dirname "$0")")" | ||
|
||
. ${SCRIPT_PATH}/fetch-scripts.sh | ||
|
||
cp "${GOASSETS_PATH}/hooks/commit-msg.sh" "${SCRIPT_PATH}/../.git/hooks/commit-msg" | ||
cp "${GOASSETS_PATH}/hooks/pre-commit.sh" "${SCRIPT_PATH}/../.git/hooks/pre-commit" | ||
cp "${GOASSETS_PATH}/hooks/pre-push.sh" "${SCRIPT_PATH}/../.git/hooks/pre-push" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# If this repository should have package specific CI config, | ||
# remove the repository name from .goassets/.github/workflows/assets-sync.yml. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this repository. | ||
# | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: CodeQL | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '23 5 * * 0' | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- '**.go' | ||
|
||
jobs: | ||
analyze: | ||
uses: pion/.goassets/.github/workflows/codeql-analysis.reusable.yml@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,20 @@ | ||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# If this repository should have package specific CI config, | ||
# remove the repository name from .goassets/.github/workflows/assets-sync.yml. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this repository. | ||
# | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Lint | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: "0 0 * * 1" | ||
|
||
|
||
jobs: | ||
lint-commit-message: | ||
name: Metadata | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Checkout .goassets | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: pion/.goassets | ||
path: ${{ github.workspace }}/.github/.goassets | ||
ref: ${{ inputs.goassets-ref }} | ||
|
||
- name: Commit Message | ||
run: .github/.goassets/scripts/lint-commit-message.sh | ||
|
||
- name: File names | ||
run: .github/.goassets/scripts/lint-filename.sh | ||
|
||
- name: Logging messages should not have trailing newlines | ||
run: .github/.goassets/scripts/lint-no-trailing-newline-in-log-messages.sh | ||
|
||
- name: Go version in go.mod | ||
run: .github/.goassets/scripts/lint-go-mod-version.sh | ||
|
||
lint-go: | ||
name: Go | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 'stable' | ||
|
||
- name: Update packages | ||
run: sudo apt-get update | ||
|
||
- name: Install GStreamer | ||
run: | | ||
sudo apt-get purge -y libunwind-14-dev | ||
sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev | ||
- name: Build data-channels | ||
run: cd c-data-channels && make | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.52.2 | ||
lint: | ||
uses: pion/.goassets/.github/workflows/lint.reusable.yml@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# If this repository should have package specific CI config, | ||
# remove the repository name from .goassets/.github/workflows/assets-sync.yml. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this repository. | ||
# | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
uses: pion/.goassets/.github/workflows/release.reusable.yml@master | ||
with: | ||
go-version: '1.20' # auto-update/latest-go-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# If this repository should have package specific CI config, | ||
# remove the repository name from .goassets/.github/workflows/assets-sync.yml. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this repository. | ||
# | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Fix go.sum | ||
on: | ||
push: | ||
branches: | ||
- renovate/* | ||
|
||
jobs: | ||
fix: | ||
uses: pion/.goassets/.github/workflows/renovate-go-sum-fix.reusable.yml@master | ||
secrets: | ||
token: ${{ secrets.PIONBOT_PRIVATE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# If this repository should have package specific CI config, | ||
# remove the repository name from .goassets/.github/workflows/assets-sync.yml. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this repository. | ||
# | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: REUSE Compliance Check | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
uses: pion/.goassets/.github/workflows/reuse.reusable.yml@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# If this repository should have package specific CI config, | ||
# remove the repository name from .goassets/.github/workflows/assets-sync.yml. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this repository. | ||
# | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
uses: pion/.goassets/.github/workflows/test.reusable.yml@master | ||
strategy: | ||
matrix: | ||
go: ['1.20', '1.19'] # auto-update/supported-go-version-list | ||
fail-fast: false | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
test-i386: | ||
uses: pion/.goassets/.github/workflows/test-i386.reusable.yml@master | ||
strategy: | ||
matrix: | ||
go: ['1.20', '1.19'] # auto-update/supported-go-version-list | ||
fail-fast: false | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
test-wasm: | ||
uses: pion/.goassets/.github/workflows/test-wasm.reusable.yml@master | ||
with: | ||
go-version: '1.20' # auto-update/latest-go-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# If this repository should have package specific CI config, | ||
# remove the repository name from .goassets/.github/workflows/assets-sync.yml. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this repository. | ||
# | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Go mod tidy | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tidy: | ||
uses: pion/.goassets/.github/workflows/tidy-check.reusable.yml@master | ||
with: | ||
go-version: '1.20' # auto-update/latest-go-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
sfu-ws/cert.pem | ||
sfu-ws/key.pem | ||
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
# SPDX-License-Identifier: MIT | ||
|
||
*.ogg | ||
### JetBrains IDE ### | ||
##################### | ||
.idea/ | ||
|
||
### Emacs Temporary Files ### | ||
############################# | ||
*~ | ||
|
||
### Folders ### | ||
############### | ||
bin/ | ||
vendor/ | ||
node_modules/ | ||
|
||
### Files ### | ||
############# | ||
*.ivf | ||
*.h264 | ||
*.ogg | ||
tags | ||
cover.out | ||
*.sw[poe] | ||
*.wasm | ||
examples/sfu-ws/cert.pem | ||
examples/sfu-ws/key.pem | ||
wasm_exec.js |
Oops, something went wrong.