81 lines
3.0 KiB
YAML
81 lines
3.0 KiB
YAML
# Linux Docker runner, Windows deliverables. No Linux plugin artifacts.
|
|
image: rust:1-bookworm
|
|
|
|
stages: [check, build]
|
|
|
|
workflow:
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"'
|
|
when: never
|
|
- if: '$CI_COMMIT_BRANCH || $CI_COMMIT_TAG'
|
|
|
|
variables:
|
|
CARGO_HOME: "$CI_PROJECT_DIR/.cargo-ci"
|
|
CARGO_TERM_COLOR: always
|
|
WINDOWS_TARGET: x86_64-pc-windows-gnu
|
|
|
|
default:
|
|
interruptible: true
|
|
cache:
|
|
key:
|
|
files:
|
|
- Cargo.lock
|
|
- plugins/resonance-compressor/Cargo.lock
|
|
prefix: rust-windows-v1
|
|
paths:
|
|
- .cargo-ci/registry/
|
|
- .cargo-ci/git/
|
|
|
|
check:
|
|
stage: check
|
|
before_script:
|
|
- apt-get update
|
|
- apt-get install -y --no-install-recommends python3 pkg-config libgl1-mesa-dev libx11-dev libxcursor-dev libx11-xcb-dev libxcb1-dev libxcb-dri2-0-dev libxcb-icccm4-dev libxkbcommon-x11-dev
|
|
- rustup component add rustfmt clippy
|
|
script:
|
|
- cargo fmt --manifest-path tools/editor-check/Cargo.toml -- --check
|
|
- cargo fmt --all -- --check
|
|
- cargo test --workspace --locked
|
|
- cargo clippy --workspace --all-targets --locked -- -D warnings
|
|
- cargo fmt --manifest-path plugins/motif-storyboard/Cargo.toml -- --check
|
|
- cargo test --manifest-path plugins/motif-storyboard/Cargo.toml --locked
|
|
- cargo clippy --manifest-path plugins/motif-storyboard/Cargo.toml --all-targets --locked -- -D warnings
|
|
- cargo fmt --manifest-path plugins/resonance-compressor/Cargo.toml -- --check
|
|
- cargo test --manifest-path plugins/resonance-compressor/Cargo.toml --locked
|
|
- cargo clippy --manifest-path plugins/resonance-compressor/Cargo.toml --all-targets --locked -- -D warnings
|
|
- mkdir -p target/editor
|
|
- cargo run --manifest-path tools/editor-check/Cargo.toml --locked -- target/editor/resonance-default.png --resonance
|
|
- cargo run --manifest-path tools/editor-check/Cargo.toml --locked -- target/editor/resonance-compact.png --resonance --compact
|
|
artifacts:
|
|
name: "editor-previews-$CI_COMMIT_SHORT_SHA"
|
|
expire_in: 7 days
|
|
paths:
|
|
- target/editor/*.png
|
|
|
|
windows:
|
|
stage: build
|
|
needs:
|
|
- job: check
|
|
artifacts: false
|
|
variables:
|
|
CARGO_TARGET_DIR: "$CI_PROJECT_DIR/target/windows"
|
|
before_script:
|
|
- apt-get update
|
|
- apt-get install -y --no-install-recommends python3 gcc-mingw-w64-x86-64
|
|
- rustup target add "$WINDOWS_TARGET"
|
|
script:
|
|
- python3 scripts/build-plugin.py --plugin motif-storyboard --target "$WINDOWS_TARGET"
|
|
- python3 scripts/build-plugin.py --plugin resonance-compressor --target "$WINDOWS_TARGET"
|
|
- python3 scripts/package-windows.py
|
|
artifacts:
|
|
name: "fl-plugins-windows-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
|
|
expire_in: 30 days
|
|
paths:
|
|
- dist/fl-plugins-windows-x86_64.zip
|
|
- dist/x86_64-pc-windows-gnu/*.clap
|
|
- dist/x86_64-pc-windows-gnu/*setup.md
|
|
- dist/x86_64-pc-windows-gnu/LICENSE
|
|
- dist/x86_64-pc-windows-gnu/Roboto-OFL.txt
|
|
- dist/x86_64-pc-windows-gnu/SHA256SUMS
|