name: Alpine on: push: branches: - main jobs: build: name: build ${{ matrix.arch }} runs-on: ${{ matrix.os }} strategy: matrix: # arch: [x86_64, x86, aarch64, armhf, armv7, ppc64le, s390x] arch: [x86_64, x86, aarch64, armhf] os: [ubuntu-latest] branch: [latest-stable] steps: - name: Checkout uses: actions/checkout@v4 - name: Set up ccache uses: actions/cache@v4 with: path: ${{ github.workspace }}/.ccache key: ccache-${{ matrix.arch }}-${{ github.run_id }} restore-keys: ccache-${{ matrix.arch }}- - name: Set up Alpine Linux for ${{ matrix.arch }} uses: jirutka/setup-alpine@v1 with: arch: ${{ matrix.arch }} branch: ${{ matrix.branch }} packages: > bash build-base ccache coreutils findutils gawk git grep tar wget xz autoconf automake libtool pkgconf linux-headers shell-name: alpine.sh - name: Build inside chroot id: build env: ARCH: ${{ matrix.arch }} CCACHE_DIR: ${{ github.workspace }}/.ccache PKG_REV: ${{ github.sha }} shell: alpine.sh {0} run: | PKG_REV=$(echo $PKG_REV | cut -c1-7) case $ARCH in x86_64) PLATFORM=x64 ;; x86) PLATFORM=x86 ;; aarch64) PLATFORM=arm64 ;; armhf) PLATFORM=arm ;; *) PLATFORM=$ARCH ;; esac make -j$(nproc) CC="ccache gcc -static-libgcc -static" || exit 1 strip -s build/youtubeUnblock tar -C build -cJvf "youtubeUnblock-$PKG_REV-$PLATFORM.tar.xz" youtubeUnblock ccache --show-stats - name: Upload artifacts if: steps.build.outcome == 'success' uses: actions/upload-artifact@v4 with: name: ${{ github.workflow }}-${{ matrix.arch }} path: ./**/youtubeUnblock*.tar.xz