Skip to content

Set festivald & festival-cli as unmaintained #545

Set festivald & festival-cli as unmaintained

Set festivald & festival-cli as unmaintained #545

Workflow file for this run

# This clippys, docs, tests, builds.
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "full"
RUST_MIN_STACK: 8000000
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
# pkg: [festival-gui, festivald, festival-cli]
pkg: [festival-gui]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache
uses: actions/cache@v3
with:
path: target
key: ${{ matrix.pkg }}-${{ matrix.os }}
- name: Install dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt update
sudo apt install -y libgtk-3-dev libasound2-dev libjack-dev libpulse-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
rustup target add aarch64-apple-darwin
fi
shell: bash
- name: Rust Toolchain
if: matrix.os != 'macos-12'
uses: dtolnay/rust-toolchain@1.70.0
with:
components: clippy, rust-src
targets: aarch64-apple-darwin,
- name: Rust Toolchain (macOS)
if: matrix.os == 'macos-12'
uses: dtolnay/rust-toolchain@1.70.0
with:
components: clippy, rust-src
targets: aarch64-apple-darwin
- name: Clippy
run: cargo clippy --release --package ${{ matrix.pkg }}
- name: Test
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
cargo test --release --package shukusai --package ${{ matrix.pkg }} --jobs 1
else
cargo test --release --package shukusai --package ${{ matrix.pkg }}
fi
- name: Build
shell: bash
run: |
# ARM builds.
if [ "$RUNNER_OS" == "macOS" ]; then
cargo build --release --package ${{ matrix.pkg }} --target aarch64-apple-darwin
fi
cargo build --release --package ${{ matrix.pkg }}
- name: Test (RPC)
if: matrix.pkg == 'festivald'
shell: bash
run: |
cargo test --release --package rpc
cargo test --release --package festival-cli -- --ignored
- name: Compress (GUI)
if: matrix.pkg == 'festival-gui'
shell: bash
run: |
mkdir OUTPUT
VERSION=$(grep -m1 "version" gui/Cargo.toml | grep -o "[0-9].[0-9].[0-9]")
DOCS=$(grep -m1 "title" gui/mdbook/book.toml | grep -o "[0-9].[0-9].[0-9]")
if [ "$VERSION" != "$DOCS" ]; then
echo "CARGO $VERSION != DOCS TITLE $DOCS"
exit 1
fi
if [ "$RUNNER_OS" == "Linux" ]; then
# AppImage
utils/mk_appimage.sh
mv utils/"Festival-v${VERSION}-x86_64.AppImage" OUTPUT/
# Tar
cp assets/images/icon/512.png target/release/festival.png
cp utils/Festival.AppDir/festival.desktop target/release/
cp LICENSE target/release/
cd target/release
tar -czpf "Festival-v${VERSION}-linux-x64.tar.gz" festival festival.png festival.desktop LICENSE
mv "Festival-v${VERSION}-linux-x64.tar.gz" ../../OUTPUT/
elif [ "$RUNNER_OS" == "macOS" ]; then
# x64
utils/mk_app.sh
utils/mk_dmg.sh "Festival-v${VERSION}-macos-x64"
mv utils/"Festival-v${VERSION}-macos-x64.dmg" OUTPUT/
# ARM64
mv target/aarch64-apple-darwin/release/festival target/release/
utils/mk_app.sh
utils/mk_dmg.sh "Festival-v${VERSION}-macos-arm64"
mv utils/"Festival-v${VERSION}-macos-arm64.dmg" OUTPUT/
elif [ "$RUNNER_OS" == "Windows" ]; then
# Zip
mv target/release/festival.exe target/release/Festival.exe
cd target/release
powershell Compress-Archive -LiteralPath Festival.exe -DestinationPath "Festival-v${VERSION}-windows-x64.zip"
mv "Festival-v${VERSION}-windows-x64.zip" ../../OUTPUT/
fi
- name: Compress (daemon)
if: matrix.pkg == 'festivald'
shell: bash
run: |
mkdir OUTPUT
VERSION="$(grep -m1 "version" daemon/Cargo.toml | grep -o "[0-9].[0-9].[0-9]")"
DOCS=$(grep -m1 "title" daemon/mdbook/book.toml | grep -o "[0-9].[0-9].[0-9]")
if [ "$VERSION" != "$DOCS" ]; then
echo "CARGO $VERSION != DOCS TITLE $DOCS"
exit 1
fi
cp LICENSE target/release/
if [ "$RUNNER_OS" == "Linux" ]; then
# Tar
cp daemon/config/festivald.service target/release/
cd target/release
tar -czpf "festivald-v${VERSION}-linux-x64.tar.gz" festivald LICENSE festivald.service
mv "festivald-v${VERSION}-linux-x64.tar.gz" ../../OUTPUT/
elif [ "$RUNNER_OS" == "macOS" ]; then
# x64
cd target/release
tar -czpf "festivald-v${VERSION}-macos-x64.tar.gz" festivald LICENSE
mv "festivald-v${VERSION}-macos-x64.tar.gz" ../../OUTPUT/
# ARM64
cd ../../
cd target/aarch64-apple-darwin/release/
cp ../../../LICENSE .
tar -czpf "festivald-v${VERSION}-macos-arm64.tar.gz" festivald LICENSE
mv "festivald-v${VERSION}-macos-arm64.tar.gz" ../../../OUTPUT/
elif [ "$RUNNER_OS" == "Windows" ]; then
# Zip
cd target/release/
powershell Compress-Archive -Path "festivald.exe","LICENSE" -DestinationPath "festivald-v${VERSION}-windows-x64.zip"
mv "festivald-v${VERSION}-windows-x64.zip" ../../OUTPUT/
fi
- name: Compress (cli)
if: matrix.pkg == 'festival-cli'
shell: bash
run: |
mkdir OUTPUT
VERSION="$(grep -m1 "version" cli/Cargo.toml | grep -o "[0-9].[0-9].[0-9]")"
DOCS=$(grep -m1 "title" cli/mdbook/book.toml | grep -o "[0-9].[0-9].[0-9]")
if [ "$VERSION" != "$DOCS" ]; then
echo "CARGO $VERSION != DOCS TITLE $DOCS"
exit 1
fi
cp LICENSE target/release/
if [ "$RUNNER_OS" == "Linux" ]; then
# Tar
cd target/release
tar -czpf "festival-cli-v${VERSION}-linux-x64.tar.gz" festival-cli LICENSE
mv "festival-cli-v${VERSION}-linux-x64.tar.gz" ../../OUTPUT/
elif [ "$RUNNER_OS" == "macOS" ]; then
# x64
cd target/release/
tar -czpf "festival-cli-v${VERSION}-macos-x64.tar.gz" festival-cli LICENSE
mv "festival-cli-v${VERSION}-macos-x64.tar.gz" ../../OUTPUT/
# ARM64
cd ../../
cd target/aarch64-apple-darwin/release/
cp ../../../LICENSE .
tar -czpf "festival-cli-v${VERSION}-macos-arm64.tar.gz" festival-cli LICENSE
mv "festival-cli-v${VERSION}-macos-arm64.tar.gz" ../../../OUTPUT/
elif [ "$RUNNER_OS" == "Windows" ]; then
# Zip
cd target/release
powershell Compress-Archive -Path "festival-cli.exe","LICENSE" -DestinationPath "festival-cli-v${VERSION}-windows-x64.zip"
mv "festival-cli-v${VERSION}-windows-x64.zip" ../../OUTPUT/
fi
- name: Archive
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.pkg }}-${{ matrix.os }}
path: OUTPUT