Skip to content

Commit

Permalink
CI: Add macos-14 (#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Feb 5, 2024
1 parent 5775aff commit c621b29
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 83 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/mediasoup-node.yaml
Expand Up @@ -20,6 +20,8 @@ jobs:
- os: ubuntu-22.04
node: 20
- os: macos-12
node: 18
- os: macos-14
node: 20
- os: windows-2022
node: 20
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mediasoup-rust.yaml
Expand Up @@ -19,6 +19,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- macos-12
- macos-14
- windows-2022

runs-on: ${{ matrix.os }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/mediasoup-worker-prebuild.yaml
Expand Up @@ -25,6 +25,9 @@ jobs:
- os: macos-12
cc: clang
cxx: clang++
- os: macos-14
cc: clang
cxx: clang++
- os: windows-2022
cc: cl
cxx: cl
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mediasoup-worker.yaml
Expand Up @@ -28,7 +28,7 @@ jobs:
- os: macos-12
cc: gcc
cxx: g++
- os: macos-12
- os: macos-14
cc: clang
cxx: clang++
- os: windows-2022
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,7 @@
- Make transport-cc feedback work similarly to libwebrtc ([PR #1088](https://github.com/versatica/mediasoup/pull/1088) by @penguinol).
- `TransportListenInfo`: "announced ip" can also be a hostname ([PR #1322](https://github.com/versatica/mediasoup/pull/1322)).
- `TransportListenInfo`: Rename "announced ip" to "announced address" ([PR #1324](https://github.com/versatica/mediasoup/pull/1324)).
- CI: Add `macos-14`.

### 3.13.17

Expand Down
6 changes: 3 additions & 3 deletions node/tsconfig.json
Expand Up @@ -8,13 +8,13 @@
"strict": true,
"outDir": "lib",
"declaration": true,
"declarationMap": true,
"declarationMap": true
},
"include": ["src"],
"watchOptions": {
"watchFile": "useFsEvents",
"watchDirectory": "useFsEvents",
"fallbackPolling": "dynamicPriority",
"synchronousWatchDirectory": true,
},
"synchronousWatchDirectory": true
}
}
45 changes: 0 additions & 45 deletions npm-scripts.mjs
Expand Up @@ -228,27 +228,11 @@ async function run() {
draft: false,
});

// GitHub mediasoup-worker-prebuild CI action doesn't create mediasoup-worker
// prebuilt binary for macOS ARM. If this is a macOS ARM machine, do it here
// and upload it to the release.
if (os.platform() === 'darwin' && os.arch() === 'arm64') {
await prebuildWorker();
await uploadMacArmPrebuiltWorker();
}

executeCmd('npm publish');

break;
}

case 'release:upload-mac-arm-prebuilt-worker': {
checkRelease();
await prebuildWorker();
await uploadMacArmPrebuiltWorker();

break;
}

default: {
logError('unknown task');

Expand Down Expand Up @@ -597,35 +581,6 @@ async function downloadPrebuiltWorker() {
});
}

async function uploadMacArmPrebuiltWorker() {
if (os.platform() !== 'darwin' || os.arch() !== 'arm64') {
logError('uploadMacArmPrebuiltWorker() | invalid platform or architecture');

exitWithError();
}

const octokit = await getOctokit();

logInfo('uploadMacArmPrebuiltWorker() | getting release info');

const release = await octokit.rest.repos.getReleaseByTag({
owner: GH_OWNER,
repo: GH_REPO,
tag: PKG.version,
});

logInfo('uploadMacArmPrebuiltWorker() | uploading release asset');

await octokit.rest.repos.uploadReleaseAsset({
owner: GH_OWNER,
repo: GH_REPO,
// eslint-disable-next-line camelcase
release_id: release.data.id,
name: WORKER_PREBUILD_TAR,
data: fs.readFileSync(WORKER_PREBUILD_TAR_PATH),
});
}

async function getOctokit() {
if (!process.env.GITHUB_TOKEN) {
throw new Error('missing GITHUB_TOKEN environment variable');
Expand Down
56 changes: 28 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions package.json
Expand Up @@ -69,8 +69,7 @@
"test:worker": "node npm-scripts.mjs test:worker",
"coverage:node": "node npm-scripts.mjs coverage:node",
"release:check": "node npm-scripts.mjs release:check",
"release": "node npm-scripts.mjs release",
"release:upload-mac-arm-prebuilt-worker": "node npm-scripts.mjs release:upload-mac-arm-prebuilt-worker"
"release": "node npm-scripts.mjs release"
},
"jest": {
"verbose": true,
Expand Down Expand Up @@ -110,19 +109,19 @@
"devDependencies": {
"@octokit/rest": "^20.0.2",
"@types/debug": "^4.1.12",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.15",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.16",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"marked": "^11.2.0",
"marked": "^12.0.0",
"open-cli": "^8.0.0",
"pick-port": "^2.0.1",
"prettier": "^3.2.4",
"prettier": "^3.2.5",
"sctp": "^1.0.0",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
Expand Down

0 comments on commit c621b29

Please sign in to comment.