Skip to content

Commit 771e1c2

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/add-bitrate-estimation-api-heK3r
2 parents 235565b + bbe61c4 commit 771e1c2

52 files changed

Lines changed: 1228 additions & 419 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release-rs.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,21 @@ jobs:
2828
uses: actions/create-github-app-token@v3
2929
id: generate-token
3030
with:
31-
# GitHub App ID secret name
3231
app-id: ${{ secrets.APP_ID }}
33-
# GitHub App private key secret name
3432
private-key: ${{ secrets.APP_PRIVATE_KEY }}
3533

36-
# Checkout the repository
3734
- name: Checkout repository
3835
uses: actions/checkout@v6
3936
with:
4037
fetch-depth: 0
4138
token: ${{ steps.generate-token.outputs.token }}
4239

43-
# Instal Rust
44-
- name: Install Rust toolchain
45-
uses: dtolnay/rust-toolchain@stable
40+
# Install Nix for system dependencies (e.g. ffmpeg)
41+
- uses: DeterminateSystems/nix-installer-action@main
42+
- uses: DeterminateSystems/magic-nix-cache-action@main
4643

47-
# Run release-plz to create PRs and releases
48-
- name: Release-plz
49-
uses: MarcoIeni/release-plz-action@v0.5
44+
- name: Release
45+
run: nix develop --command just release
5046
env:
5147
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
5248
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ node_modules
3030
*.m3u8
3131
*.m4s
3232

33+
# Cloudflare Wrangler
34+
.wrangler/
35+
3336
# We're using bun
3437
package-lock.json
3538
yarn.lock

.release-plz.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
[workspace]
22
dependencies_update = true
33
git_release_enable = false
4+
5+
[[package]]
6+
name = "libmoq"
7+
git_only = true
8+
9+
[[package]]
10+
name = "moq-ffi"
11+
git_only = true

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bun.lock

Lines changed: 25 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cdn/boy/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gen/

cdn/boy/boy-prepare.service.tftpl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[Unit]
2+
Description=Download all Game Boy ROMs
3+
4+
[Service]
5+
Type=oneshot
6+
RemainAfterExit=yes
7+
User=root
8+
WorkingDirectory=/var/lib/moq
9+
10+
%{ for rom in roms ~}
11+
ExecStart=/var/lib/moq/pkg/bin/wget -nv https://rom.moq.dev/${rom} -O /var/lib/moq/${rom}
12+
%{ endfor ~}
13+
14+
[Install]
15+
WantedBy=multi-user.target

cdn/boy/boy.service.tftpl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[Unit]
2+
Description=MoQ Boy - ${name}
3+
After=network-online.target boy-prepare.service
4+
Wants=network-online.target
5+
Requires=boy-prepare.service
6+
7+
[Service]
8+
Type=simple
9+
User=root
10+
WorkingDirectory=/var/lib/moq
11+
Environment="RUST_LOG=info"
12+
13+
ExecStart=/var/lib/moq/pkg/bin/moq-boy \
14+
--url "https://${domain}/anon" \
15+
--rom "/var/lib/moq/${rom}" \
16+
--name "${name}"
17+
18+
# Restart with exponential backoff
19+
Restart=always
20+
RestartSec=10s
21+
22+
StandardOutput=journal
23+
StandardError=journal
24+
25+
[Install]
26+
WantedBy=multi-user.target

cdn/boy/flake.nix

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
description = "MoQ Boy - Game Boy emulator publisher";
3+
4+
nixConfig = {
5+
extra-substituters = [ "https://kixelated.cachix.org" ];
6+
extra-trusted-public-keys = [ "kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk=" ];
7+
};
8+
9+
inputs = {
10+
# Pin to a release tag via: just pin
11+
moq.url = "github:moq-dev/moq";
12+
# Don't override nixpkgs — use moq's pin so Cachix cache hits
13+
};
14+
15+
outputs =
16+
{ moq, ... }:
17+
{
18+
packages.x86_64-linux =
19+
let
20+
system = "x86_64-linux";
21+
pkgs = moq.inputs.nixpkgs.legacyPackages.${system};
22+
in
23+
{
24+
default = pkgs.symlinkJoin {
25+
name = "moq-boy";
26+
paths = [
27+
moq.packages.${system}.moq-boy
28+
pkgs.wget
29+
];
30+
};
31+
};
32+
};
33+
}

0 commit comments

Comments
 (0)