-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #436 from stumpapp/release/v0.0.6
🔖 Release v0.0.6
- Loading branch information
Showing
270 changed files
with
6,363 additions
and
2,778 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ inputs: | |
tags: | ||
description: 'List of tags to assigned to the image' | ||
default: 'nightly' | ||
platforms: | ||
archs: | ||
description: 'List of platforms to build' | ||
required: true | ||
discord-webhook: | ||
|
@@ -33,17 +33,30 @@ runs: | |
|
||
- name: Format tags | ||
run: | | ||
echo "TAGS=$(echo ${{ inputs.tags }} | sed -e 's/,/,aaronleopold\/stump:/g' | sed -e 's/^/aaronleopold\/stump:/')" >> $GITHUB_ENV | ||
echo "FORMATTED_TAGS=$(echo ${{ inputs.tags }} | sed -e 's/,/ /g')" >> $GITHUB_ENV | ||
echo "LOCAL_IMAGES=$(echo ${{ inputs.tags }} | sed -e 's/,/,localhost\/stump:/g' | sed -e 's/^/localhost\/stump:/')" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Sanity check | ||
run: | | ||
echo "TAGS=${{ inputs.tags }}" | ||
echo "FORMATTED_TAGS=${{ env.FORMATTED_TAGS }}" | ||
echo "LOCAL_IMAGES=${{ env.LOCAL_IMAGES }}" | ||
echo "GIT_REV=${{ env.GIT_REV }}" | ||
shell: bash | ||
|
||
- name: Setup rust | ||
uses: ./.github/actions/setup-rust | ||
with: | ||
# Note: until some sort of local caching is implemented, we don't want to cache dependencies | ||
# because the network overhead is too high and eats up lots of time | ||
cache-dependencies: ${{ runner.environment != 'self-hosted' }} | ||
|
||
# We only need QEMU when an arm* platform is targeted | ||
- name: Check QEMU requirement | ||
id: check-qemu | ||
run: | | ||
if [[ ${{ inputs.platforms }} == *"arm"* ]]; then | ||
if [[ ${{ inputs.archs }} == *"arm"* ]]; then | ||
echo "SETUP_QEMU=1" >> $GITHUB_OUTPUT | ||
else | ||
echo "SETUP_QEMU=0" >> $GITHUB_OUTPUT | ||
|
@@ -53,35 +66,59 @@ runs: | |
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
if: ${{ steps.check-qemu.outputs.SETUP_QEMU == '1' }} | ||
with: | ||
platforms: linux/arm64 | ||
|
||
- name: Install podman and buildah | ||
if: runner.environment != 'self-hosted' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y podman buildah | ||
shell: bash | ||
|
||
- name: Remove existing images | ||
run: | | ||
podman rmi ${{ env.LOCAL_IMAGES }} || true | ||
shell: bash | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Run buildah build | ||
id: build | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: stump | ||
tags: ${{ env.FORMATTED_TAGS }} | ||
archs: ${{ inputs.archs }} | ||
build-args: | | ||
GIT_REV=${{ env.GIT_REV }} | ||
RUN_PRISMA_GENERATE=false | ||
containerfiles: | | ||
./docker/Dockerfile | ||
- name: Echo build outputs | ||
run: | | ||
echo "${{ toJSON(steps.build.outputs) }}" | ||
shell: bash | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
# if both inputs are empty, we assume we're running on a fork and don't need to login | ||
if: ${{ inputs.username != '' && inputs.password != '' }} | ||
- name: Push to registry | ||
id: push | ||
if: ${{ success() && inputs.push == 'true' }} | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: ${{ steps.build.outputs.image }} | ||
tags: ${{ steps.build.outputs.tags }} | ||
username: ${{ inputs.username }} | ||
password: ${{ inputs.password }} | ||
registry: docker.io/aaronleopold | ||
|
||
- name: Run buildx build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
build-args: | | ||
"GIT_REV=${{ env.GIT_REV }}" | ||
"TAGS=${{ env.TAGS }}" | ||
file: docker/Dockerfile | ||
platforms: ${{ inputs.platforms }} | ||
load: ${{ inputs.load }} | ||
push: ${{ inputs.push }} | ||
tags: ${{ env.TAGS }} | ||
- name: Echo push outputs | ||
run: | | ||
echo "${{ toJSON(steps.push.outputs) }}" | ||
shell: bash | ||
|
||
- name: Discord notification | ||
if: ${{ success() && inputs.push == 'true' && inputs.discord-webhook != '' }} | ||
env: | ||
DISCORD_WEBHOOK: ${{ inputs.discord-webhook }} | ||
uses: 'Ilshidur/[email protected]' | ||
with: | ||
args: 'Successfully pushed the following image tags to registry: ${{ env.TAGS }}' | ||
args: 'Successfully pushed the following image tags to registry: ${{ steps.build.outputs.tags }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Coverage CI | ||
description: Run code coverage checks | ||
|
||
inputs: | ||
token: | ||
description: 'Codecov token' | ||
required: true | ||
cache-dependencies: | ||
description: 'Whether to cache dependencies. This does not affect the Prisma client cache.' | ||
required: false | ||
default: 'true' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup rust | ||
uses: ./.github/actions/setup-rust | ||
with: | ||
cache-dependencies: ${{ inputs.cache-dependencies }} | ||
|
||
- name: Install cargo-llvm-cov | ||
run: cargo install cargo-llvm-cov | ||
shell: bash | ||
|
||
- name: Generate code coverage data | ||
shell: bash | ||
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ inputs.token }} | ||
files: lcov.info | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Dav1d | ||
description: Compile and install dav1d | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# Linux Section | ||
- name: Install nasm | ||
if: runner.os == 'Linux' | ||
uses: ilammy/setup-nasm@v1 | ||
|
||
- name: Install Python 3.9 | ||
if: runner.os == 'Linux' | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install pip packages | ||
if: runner.os == 'Linux' | ||
shell: bash | ||
run: | | ||
pip install -U pip | ||
pip install -U wheel setuptools | ||
pip install -U meson ninja | ||
- name: Build dav1d | ||
if: runner.os == 'Linux' | ||
env: | ||
DAV1D_DIR: dav1d_dir | ||
LIB_PATH: lib/x86_64-linux-gnu | ||
shell: bash | ||
run: | | ||
git clone --branch 1.3.0 --depth 1 https://code.videolan.org/videolan/dav1d.git | ||
cd dav1d | ||
meson build -Dprefix=$HOME/$DAV1D_DIR -Denable_tools=false -Denable_examples=false --buildtype release | ||
ninja -C build | ||
ninja -C build install | ||
echo "PKG_CONFIG_PATH=$HOME/$DAV1D_DIR/$LIB_PATH/pkgconfig" >> $GITHUB_ENV | ||
echo "LD_LIBRARY_PATH=$HOME/$DAV1D_DIR/$LIB_PATH" >> $GITHUB_ENV | ||
# Windows setup | ||
- name: Install nasm | ||
if: runner.os == 'Windows' | ||
uses: ilammy/setup-nasm@v1 | ||
|
||
- name: Install Python 3.9 | ||
if: runner.os == 'Windows' | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install pip packages | ||
if: runner.os == 'Windows' | ||
shell: powershell | ||
run: | | ||
pip install -U pip | ||
pip install -U wheel setuptools | ||
pip install -U meson ninja | ||
- name: Setting up environment | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
run: | | ||
echo "PKG_CONFIG=c:\build\bin\pkg-config.exe" >> $GITHUB_ENV | ||
echo "PKG_CONFIG_PATH=C:\build\lib\pkgconfig" >> $GITHUB_ENV | ||
echo "C:\build\bin" >> $GITHUB_PATH | ||
- name: Build pkg-config | ||
if: runner.os == 'Windows' | ||
shell: powershell | ||
run: | | ||
git clone --branch meson-glib-subproject --depth 1 https://gitlab.freedesktop.org/tpm/pkg-config.git | ||
cd pkg-config | ||
meson build -Dprefix=C:\build --buildtype release | ||
ninja -C build | ||
ninja -C build install | ||
- name: Build dav1d | ||
if: runner.os == 'Windows' | ||
shell: powershell | ||
run: | | ||
git clone --branch 1.3.0 --depth 1 https://code.videolan.org/videolan/dav1d.git | ||
cd dav1d | ||
meson build -Dprefix=C:\build -Denable_tools=false -Denable_examples=false --buildtype release | ||
ninja -C build | ||
ninja -C build install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Setup Yarn | ||
description: Install Yarn and setup cache | ||
|
||
inputs: | ||
cache-dependencies: | ||
description: 'Cache dependencies. This does not affect the Prisma client cache.' | ||
required: false | ||
default: 'true' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.0.0' | ||
|
||
- name: Install yarn | ||
shell: bash | ||
run: npm install -g yarn | ||
|
||
- name: Setup node (yarn cache) | ||
if: ${{ inputs.cache-dependencies == 'true' }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.0.0' | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
shell: bash |
Oops, something went wrong.