From 580ef0e8114226e653f8decdc14360c61ed675be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=99=A0=EF=B8=8F=20Thomas=20Gotwig=20=E2=99=A3=EF=B8=8F?= Date: Sat, 27 Apr 2024 08:42:41 +0200 Subject: [PATCH] test --- .github/workflows/install.yml | 62 +++++++++++++++++++++++++ .github/workflows/rust.yml | 86 ----------------------------------- 2 files changed, 62 insertions(+), 86 deletions(-) create mode 100644 .github/workflows/install.yml delete mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml new file mode 100644 index 0000000..64f4969 --- /dev/null +++ b/.github/workflows/install.yml @@ -0,0 +1,62 @@ +name: Install Vidmerger + +on: [push] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y wget + + - name: Install dependencies (MacOS) + if: runner.os == 'macos' + run: | + brew install wget + + - name: Install dependencies (Windows) + if: runner.os == 'windows' + run: | + # Install Chocolatey package manager (one-time setup) + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::Expect100Continue = $false; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -NoProfile -AllowUntrustedRepos; choco config add source chocolateycommunity + + # Install dependencies using Chocolatey + choco install curl + + - name: Download Vidmerger (Linux-ARM) + if: runner.os == 'Linux' && architecture == 'arm64' + run: | + sudo wget -c https://github.com/bonny1992/vidmerger/releases/latest/download/vidmerger-linux-arm64.tar.gz -P /tmp && sudo tar -xzvf /tmp/vidmerger-linux-arm64.tar.gz -C /usr/local/bin + + - name: Download Vidmerger (Linux-x86) + if: runner.os == 'Linux' && architecture != 'arm64' + run: | + sudo wget -c https://github.com/TGotwig/vidmerger/releases/latest/download/vidmerger-linux.tar.gz -P /tmp && sudo tar -xzvf /tmp/vidmerger-linux.tar.gz -C /usr/local/bin + + - name: Download Vidmerger (MacOS) + if: runner.os == 'macos' + run: | + brew tap tgotwig/vidmerger + brew install vidmerger + + - name: Download Vidmerger (Windows) + if: runner.os == 'windows' + run: | + curl -L https://github.com/TGotwig/vidmerger/releases/latest/download/vidmerger.exe -o C:\vidmerger.exe + + - name: Add Vidmerger to PATH (Windows) + if: runner.os == 'windows' + run: | + echo "C:\vidmerger.exe" >> $env:PATH # Add download directory to PATH + + - name: Verify installation + run: | + vidmerger --version diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 72a2c44..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: 🦀 Running Rust - -on: [push, pull_request] - -env: - CARGO_TERM_COLOR: always - -jobs: - Linter: - runs-on: ubuntu-latest - name: 🧹 Linter - steps: - - name: 🚀 actions/checkout@v4 - uses: actions/checkout@v4 - - name: 🕵️ Run linter - run: cargo clippy - MacOS: - name: 🍎 MacOS - runs-on: macos-latest - steps: - - name: 🚀 actions/checkout@v4 - uses: actions/checkout@v4 - - - name: ⬇ Install yt-dlp - run: | - wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O yt-dlp - chmod a+rx yt-dlp - echo "$(pwd)" >> $GITHUB_PATH - - - name: ⬇️ Install ffmpeg - run: brew install ffmpeg - - - name: ⬇️ Install task - run: brew install go-task/tap/go-task - - - name: 🕵️ Run tests - run: task test - Ubuntu: - runs-on: ubuntu-latest - name: 🐧 Ubuntu - steps: - - name: 🚀 actions/checkout@v4 - uses: actions/checkout@v4 - - - name: ⬇️ Update package lists - run: sudo apt-get update - - - name: ⬇️ Install yt-dlp - run: | - wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O yt-dlp - chmod a+rx yt-dlp - echo "$(pwd)" >> $GITHUB_PATH - - - name: ⬇️ Install ffmpeg - run: sudo apt install -y ffmpeg - - - name: ⬇️ Install task - run: | - curl -sL "https://github.com/go-task/task/releases/download/v3.9.0/task_linux_amd64.tar.gz" | tar xz - sudo mv task /usr/local/bin - - - name: 🕵️ Run tests - run: task test - Windows: - runs-on: windows-latest - name: 🏳️‍🌈 Windows - steps: - - name: 🚀 actions/checkout@v4 - uses: actions/checkout@v4 - - - name: ⬇️ Install chocolatey - uses: crazy-max/ghaction-chocolatey@v1 - with: - args: -h - - - name: ⬇️ Install yt-dlp - run: choco install yt-dlp - - - name: ⬇️ Install ffmpeg - run: choco install ffmpeg - - - name: ⬇️ Install task - run: choco install go-task - - - name: 🕵️ Run tests - run: task test