Skip to content

Commit

Permalink
Merge pull request #158 from blinemedical/update-everything
Browse files Browse the repository at this point in the history
Update and fix everything
  • Loading branch information
jawilson authored Nov 17, 2023
2 parents 773a464 + dfd812f commit f3e32b5
Show file tree
Hide file tree
Showing 14 changed files with 77,598 additions and 57,767 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2022
},
"rules": {
}
Expand Down
102 changes: 51 additions & 51 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
# `dist/index.js` is a special file in Actions.
# When you reference an action with `uses:` in a workflow,
# `index.js` is the code that will run.
# For our project, we generate this file through a build process from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check dist/

on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
check-dist:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set Node.js 18.x
uses: actions/setup-node@v4.0.0
with:
node-version: 18.x

- name: Install dependencies
run: npm ci

- name: Rebuild the dist/ directory
run: npm run prepare

- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v3
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: dist/
# `dist/index.js` is a special file in Actions.
# When you reference an action with `uses:` in a workflow,
# `index.js` is the code that will run.
# For our project, we generate this file through a build process from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check dist/

on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
check-dist:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Rebuild the dist/ directory
run: npm run prepare

- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v3
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: dist/
86 changes: 43 additions & 43 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
name: "units-test"
on:
pull_request:
push:
branches:
- main

jobs:
# unit tests
units:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-2019', 'windows-2022', 'macos-12', 'ubuntu-20.04']
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test

# test action works running from the graph
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-2019', 'windows-2022', 'macos-12', 'ubuntu-20.04']
arch: ['x86', 'x86_64']
exclude:
- os: 'macos-12'
arch: 'x86'
- os: 'ubuntu-20.04'
arch: 'x86'

steps:
- uses: actions/checkout@v4

- name: Setup GStreamer with default version
uses: ./
with:
arch: ${{ matrix.arch }}

- name: Run gst-inspect --version
run: |
gst-inspect-1.0 --version
name: "units-test"
on:
pull_request:
push:
branches:
- main

jobs:
# unit tests
units:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-2019', 'windows-2022', 'macos-12', 'ubuntu-20.04']
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test

# test action works running from the graph
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-2019', 'windows-2022', 'macos-12', 'ubuntu-20.04']
arch: ['x86', 'x86_64']
exclude:
- os: 'macos-12'
arch: 'x86'
- os: 'ubuntu-20.04'
arch: 'x86'

steps:
- uses: actions/checkout@v4

- name: Setup GStreamer with default version
uses: ./
with:
arch: ${{ matrix.arch }}

- name: Run gst-inspect --version
run: |
gst-inspect-1.0 --version
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Tested runner environments are macOS, Windows, and Ubuntu 20.04.

### `version`

The version of GStreamer to install. The default is `1.22.0`
The version of GStreamer to install. The default is `1.22.7`

### `arch`

Expand Down Expand Up @@ -56,4 +56,3 @@ See the `.github/workflows/test.yml` for other examples.
**References:**
* [Custom Actions](https://docs.github.com/en/actions/creating-actions/about-custom-actions)
* [Action Toolkit](https://github.com/actions/toolkit)

2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
version:
description: 'version number'
required: false
default: '1.22.0'
default: '1.22.7'
arch:
description: 'architecture (x86, x86_64)'
required: false
Expand Down
Loading

0 comments on commit f3e32b5

Please sign in to comment.