Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.

Remove unnecessary

Remove unnecessary #8

Workflow file for this run

name: Build
on:
schedule:
- cron: '30 5 * * *'
workflow_dispatch:
branches:
- '**'
push:
branches:
- '**'
permissions: write-all
jobs:
cross-build:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
target: [
# Windows
'x86_64-w64-mingw32',
'i686-w64-mingw32',
# macOS
'aarch64-unknown-apple-darwin',
'x86_64-unknown-apple-darwin',
# Linux (glibc)
'x86_64-unknown-linux-gnu',
'i386-unknown-linux-gnu',
'arm-unknown-linux-gnueabi',
'arm-unknown-linux-gnueabihf',
'aarch64-unknown-linux-gnu',
# Linux (musl)
'aarch64-unknown-linux-musl',
'x86_64-unknown-linux-musl',
'armv6-unknown-linux-musleabihf',
'armv7-unknown-linux-musleabihf',
'i386-unknown-linux-musl',
# FreeBSD
'x86_64-unknown-freebsd',
'aarch64-unknown-freebsd',
'i386-unknown-freebsd',
# NetBSD
'i386-unknown-netbsdelf',
'x86_64-unknown-netbsd',
# DragonFly BSD
'x86_64-unknown-dragonfly',
# Android
'x86_64-unknown-linux-android',
'i686-unknown-linux-android21',
'aarch64-unknown-linux-android',
'riscv64-unknown-linux-android',
'armv7-unknown-linux-androideabi21',
]
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Cross-compile revf to ${{ matrix.target }}
working-directory: './'
env:
CMAKE_INSTALL_PREFIX: /tmp/revf
run: |
if [[ '${{ matrix.target }}' = *'-linux-musl'* ]]; then
declare -r RAIDEN_TARBALL='/tmp/toolchain.tar.xz'
declare -r RAIDEN_URL="https://github.com/AmanoTeam/musl-gcc-cross/releases/latest/download/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${RAIDEN_URL}" --output "${RAIDEN_TARBALL}"
tar --directory="$(dirname "${RAIDEN_TARBALL}")" --extract --file="${RAIDEN_TARBALL}"
export RAIDEN_HOME='/tmp/musl-gcc-cross'
export PATH="${RAIDEN_HOME}/bin:${PATH}"
source "${RAIDEN_HOME}/build/autotools/${{ matrix.target }}.sh"
elif [[ '${{ matrix.target }}' = *'-linux-gnu'* ]]; then
declare -r OBGGCC_TARBALL='/tmp/toolchain.tar.xz'
declare -r OBGGCC_URL="https://github.com/AmanoTeam/obggcc/releases/latest/download/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${OBGGCC_URL}" --output "${OBGGCC_TARBALL}"
tar --directory="$(dirname "${OBGGCC_TARBALL}")" --extract --file="${OBGGCC_TARBALL}"
export OBGGCC_HOME='/tmp/obggcc'
export PATH="${OBGGCC_HOME}/bin:${PATH}"
source "${OBGGCC_HOME}/build/autotools/${{ matrix.target }}.sh"
elif [[ '${{ matrix.target }}' = *'-freebsd' ]]; then
declare -r LOKI_TARBALL='/tmp/toolchain.tar.xz'
declare -r LOKI_URL="https://github.com/AmanoTeam/freebsd-gcc-cross/releases/latest/download/x86_64-unknown-linux-gnu.tar.xz"
curl --silent --connect-timeout '10' --retry '15' --retry-all-errors --fail --location --url "${LOKI_URL}" --output "${LOKI_TARBALL}"
tar --directory="$(dirname "${LOKI_TARBALL}")" --extract --file="${LOKI_TARBALL}"
export LOKI_HOME='/tmp/freebsd-gcc-cross'
export PATH="${LOKI_HOME}/bin:${PATH}"
source "${LOKI_HOME}/build/autotools/${{ matrix.target }}.sh"
elif [[ '${{ matrix.target }}' = *'-netbsd'* ]]; then
declare -r DAKINI_TARBALL='/tmp/toolchain.tar.xz'
declare -r DAKINI_URL="https://github.com/AmanoTeam/netbsd-gcc-cross/releases/latest/download/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${DAKINI_URL}" --output "${DAKINI_TARBALL}"
tar --directory="$(dirname "${DAKINI_TARBALL}")" --extract --file="${DAKINI_TARBALL}"
export DAKINI_HOME='/tmp/netbsd-gcc-cross'
export PATH="${DAKINI_HOME}/bin:${PATH}"
source "${DAKINI_HOME}/build/autotools/${{ matrix.target }}.sh"
elif [[ '${{ matrix.target }}' = *'-dragonfly' ]]; then
declare -r VENTI_TARBALL='/tmp/toolchain.tar.xz'
declare -r VENTI_URL="https://github.com/AmanoTeam/dragonfly-gcc-cross/releases/latest/download/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${VENTI_URL}" --output "${VENTI_TARBALL}"
tar --directory="$(dirname "${VENTI_TARBALL}")" --extract --file="${VENTI_TARBALL}"
export VENTI_HOME='/tmp/dragonfly-gcc-cross'
export PATH="${VENTI_HOME}/bin:${PATH}"
source "${VENTI_HOME}/build/autotools/${{ matrix.target }}.sh"
elif [[ '${{ matrix.target }}' = *'-mingw32' ]]; then
declare -r MINGW_TARBALL='/tmp/toolchain.tar.xz'
declare -r MINGW_URL="https://github.com/AmanoTeam/mingw-gcc-cross/releases/latest/download/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${MINGW_URL}" --output "${MINGW_TARBALL}"
tar --directory="$(dirname "${MINGW_TARBALL}")" --extract --file="${MINGW_TARBALL}"
export MINGW_HOME='/tmp/mingw-gcc-cross'
export PATH="${MINGW_HOME}/bin:${PATH}"
source "${MINGW_HOME}/build/autotools/${{ matrix.target }}.sh"
elif [[ '${{ matrix.target }}' = *'-darwin' ]]; then
curl \
--silent \
--show-error \
--fail \
--url 'https://raw.githubusercontent.com/AmanoTeam/darwin-clang-cross/refs/heads/master/main.sh' \
| bash -s -- install
export DARWIN_HOME='/tmp/darwin-clang-cross'
export PATH="${DARWIN_HOME}/bin:${PATH}"
source "${DARWIN_HOME}/build/autotools/${{ matrix.target }}.sh"
elif [[ '${{ matrix.target }}' = *'-android'* ]]; then
declare -r PINO_TARBALL='/tmp/toolchain.tar.xz'
declare -r PINO_URL="https://github.com/AmanoTeam/android-gcc-cross/releases/latest/download/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${PINO_URL}" --output "${PINO_TARBALL}"
tar --directory="$(dirname "${PINO_TARBALL}")" --extract --file="${PINO_TARBALL}"
export PINO_HOME='/tmp/android-gcc-cross'
export PATH="${PINO_HOME}/bin:${PATH}"
source "${PINO_HOME}/build/autotools/${{ matrix.target }}.sh"
sudo sed \
--in-place \
'/CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG/d' \
'/usr/local/share/cmake-'*'/Modules/Platform/Android.cmake'
fi
echo "CROSS_COMPILE_TRIPLET=${CROSS_COMPILE_TRIPLET}" >> "${GITHUB_ENV}"
cmake \
-DCMAKE_BUILD_TYPE='Release' \
-S "${PWD}" \
-B "${PWD}/build"
cmake --build "${PWD}/build" -- --jobs
cmake --install "${PWD}/build" --strip
- name: Generate tarball
run: |
if [[ '${{ env.CROSS_COMPILE_TRIPLET }}' = *'-mingw32' ]]; then
declare tarball_filename='/tmp/${{ env.CROSS_COMPILE_TRIPLET }}.zip'
cd '/tmp'
zip --recurse-paths -9 "${tarball_filename}" 'revf'
else
declare tarball_filename='/tmp/${{ env.CROSS_COMPILE_TRIPLET }}.tar.xz'
tar --directory='/tmp' --create --file=- 'revf' | xz --threads='0' --extreme --memlimit-compress='100%' --compress -9 > "${tarball_filename}"
fi
sha256sum "${tarball_filename}" | sed 's|/tmp/||' > "${tarball_filename}.sha256"
- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: ${{ env.CROSS_COMPILE_TRIPLET }}
if-no-files-found: error
path: |
/tmp/${{ env.CROSS_COMPILE_TRIPLET }}.*
release:
needs: cross-build
runs-on: ubuntu-latest
name: Create release
steps:
- name: Download all artifacts
uses: actions/download-artifact@main
- name: Create release
uses: softprops/action-gh-release@master
with:
tag_name: 'nightly'
name: 'Bento4 Nightly Builds'
files: ./*/*.{tar.xz,zip}
draft: false
prerelease: false
fail_on_unmatched_files: true
body: '* Bento4 Nightly Builds'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}