diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml new file mode 100644 index 0000000..70ff318 --- /dev/null +++ b/.github/workflows/install.yml @@ -0,0 +1,98 @@ +name: ๐Ÿ’ฟ Install Vidmerger + +on: [push, workflow_dispatch] + +jobs: + # --- โ—๏ธ X64 --- + + install-x64-macos-homebrew: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: Install Vidmerger + run: | + brew tap tgotwig/vidmerger + brew install vidmerger + - name: Verify installation + run: | + ffmpeg -version + vidmerger --version + # ๐Ÿ”Ž Check if version from Cargo.toml matches with binary + [[ $(grep -o '^version = ".*"' Cargo.toml | awk -F'"' '{print $2}') == $(vidmerger -V | awk '{print $2}') ]] && echo "Versions match" || { echo "Versions do not match"; exit 1; } + + install-x64-linux-homebrew: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Homebrew + run: | + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + - name: Install Vidmerger + run: | + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + brew --help + brew tap tgotwig/linux-vidmerger + brew install vidmerger + - name: Verify installation + run: | + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + ffmpeg -version + vidmerger --version + # ๐Ÿ”Ž Check if version from Cargo.toml matches with binary + [[ $(grep -o '^version = ".*"' Cargo.toml | awk -F'"' '{print $2}') == $(vidmerger -V | awk '{print $2}') ]] && echo "Versions match" || { echo "Versions do not match"; exit 1; } + + install-x64-linux-curl: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Vidmerger + run: | + sudo curl -L https://github.com/TGotwig/vidmerger/releases/latest/download/vidmerger-linux.tar.gz -o /tmp/vidmerger-linux.tar.gz && sudo tar -xzvf /tmp/vidmerger-linux.tar.gz -C /usr/local/bin + - name: Verify installation + run: | + vidmerger --version + # ๐Ÿ”Ž Check if version from Cargo.toml matches with binary + [[ $(grep -o '^version = ".*"' Cargo.toml | awk -F'"' '{print $2}') == $(vidmerger -V | awk '{print $2}') ]] && echo "Versions match" || { echo "Versions do not match"; exit 1; } + + install-x64-windows-chocolatey: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - name: Install Vidmerger + run: | + choco install vidmerger + - name: Verify installation + run: | + vidmerger --version + # ๐Ÿ”Ž Check if version from Cargo.toml matches with binary + if ((Select-String -Path .\Cargo.toml -Pattern 'version = "(.*)"' | ForEach-Object { $_.Matches.Groups[1].Value }) -eq (vidmerger -V | ForEach-Object { $_ -split ' ' })[1]) { Write-Output "Versions match" } else { Write-Output "Versions do not match"; exit 1 } + + # --- โ—๏ธ ARM64 --- + + install-arm64-macos-homebrew: + runs-on: ARM64 + steps: + - uses: actions/checkout@v3 + - name: Install Vidmerger + run: | + brew tap tgotwig/vidmerger + brew install vidmerger + - name: Verify installation + run: | + ffmpeg -version + vidmerger --version + # ๐Ÿ”Ž Check if version from Cargo.toml matches with binary + [[ $(grep -o '^version = ".*"' Cargo.toml | awk -F'"' '{print $2}') == $(vidmerger -V | awk '{print $2}') ]] && echo "Versions match" || { echo "Versions do not match"; exit 1; } + + install-arm64-linux-curl: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pguyot/arm-runner-action@v2 + with: + base_image: raspios_lite_arm64:latest + commands: | + sudo curl -L https://github.com/tgotwig/vidmerger/releases/download/0.3.2/vidmerger-linux-arm64.tar.gz -o /tmp/vidmerger-linux-arm64.tar.gz && sudo tar -xzvf /tmp/vidmerger-linux-arm64.tar.gz -C /usr/local/bin + vidmerger --version + # ๐Ÿ”Ž Check if version from Cargo.toml matches with binary + version_cargo=$(grep -o '^version = ".*"' Cargo.toml | awk -F'"' '{print $2}') && version_vidmerger=$(vidmerger -V | awk '{print $2}') && [ "$version_cargo" = "$version_vidmerger" ] && echo "Versions match" || { echo "Versions do not match"; exit 1; } 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