mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-03 16:41:26 +01:00
fixed ci
This commit is contained in:
1 parent
4c842402a6
commit
6b0d5040f6
5 files changed
+95
-98
No files matched your search
+39
-15
@@ -10,11 +10,8 @@ env:
|
||||
|
||||
jobs:
|
||||
gate:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-24.04, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Gate (Linux)
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -26,22 +23,49 @@ jobs:
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
# libmpv for pstr-player. On Windows the DLL and import library are
|
||||
# bundled from the mpv-dev build rather than installed system-wide.
|
||||
- name: Install libmpv (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
# libmpv for pstr-player.
|
||||
- name: Install libmpv
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libmpv-dev
|
||||
|
||||
# Without this the test binaries do not link: there is no mpv.lib on the
|
||||
# runner. See .github/actions/libmpv-windows.
|
||||
- name: Install libmpv (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
uses: ./.github/actions/libmpv-windows
|
||||
|
||||
- run: cargo fmt --all -- --check
|
||||
|
||||
- run: cargo clippy --workspace --all-targets -- -D warnings
|
||||
|
||||
- run: cargo test --workspace --locked
|
||||
|
||||
# The Windows artifacts are cross-compiled from Linux with mingw-w64 — see
|
||||
# scripts/build-windows.sh — so this checks the target that actually ships.
|
||||
# It is a compile check, not a test run: nothing here executes a Windows
|
||||
# binary. libmpv is not linked at build time by anything but `-l mpv`, which
|
||||
# is why the import library out of the mpv-dev archive is all it needs.
|
||||
windows-cross:
|
||||
name: Gate (Windows cross)
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: "1.96"
|
||||
components: clippy
|
||||
targets: x86_64-pc-windows-gnu
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Install the cross toolchain
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y mingw-w64 p7zip-full
|
||||
|
||||
- name: Fetch libmpv's Windows development files
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
run: scripts/build-windows.sh --fetch-mpv mpv
|
||||
|
||||
- name: clippy (x86_64-pc-windows-gnu)
|
||||
run: |
|
||||
RUSTFLAGS="-L native=$PWD/dist/mpv-dev" \
|
||||
cargo clippy --workspace --all-targets \
|
||||
--target x86_64-pc-windows-gnu -- -D warnings
|
||||
@@ -96,28 +96,35 @@ jobs:
|
||||
dist/*.rpm
|
||||
if-no-files-found: error
|
||||
|
||||
# Cross-compiled from Linux with mingw-w64, and the .msi built by wixl rather
|
||||
# than WiX — scripts/build-windows.sh, which is how these artifacts have been
|
||||
# produced by hand. A windows runner would need MSVC's mpv.lib, and current
|
||||
# mpv-dev archives ship only the mingw import library.
|
||||
windows:
|
||||
name: Windows artifacts
|
||||
needs: verify
|
||||
runs-on: windows-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: "1.96"
|
||||
targets: x86_64-pc-windows-gnu
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
# Sets MPV_DEV_DIR, which is what build.ps1 reads when -MpvDev is absent.
|
||||
- name: Install libmpv
|
||||
uses: ./.github/actions/libmpv-windows
|
||||
# mingw-w64 for the cross compile, msitools for wixl, p7zip for the
|
||||
# mpv-dev archive.
|
||||
- name: Install the cross toolchain
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y mingw-w64 msitools zip p7zip-full
|
||||
|
||||
# build.ps1 installs the WiX toolset itself if `wix` is missing, and the
|
||||
# runner has the .NET SDK it needs for that.
|
||||
- name: Build the portable .zip and the .msi
|
||||
shell: pwsh
|
||||
run: scripts\build.ps1 -Artifacts zip,msi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
run: scripts/build-windows.sh --fetch-mpv
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user