Skip to content

Commit

Permalink
Rebrand
Browse files Browse the repository at this point in the history
  • Loading branch information
noituri committed Dec 3, 2024
1 parent f10f64f commit 57432c4
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 62 deletions.
47 changes: 21 additions & 26 deletions .github/workflows/package_for_release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: package for release
on:
workflow_dispatch:
inputs:
version:
type: string
description: Release version
required: true
workflow_dispatch: {}

jobs:
linux:
Expand All @@ -27,13 +22,13 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: live_compositor_linux_x86_64.tar.gz
path: live_compositor_linux_x86_64.tar.gz
name: smelter_linux_x86_64.tar.gz
path: smelter_linux_x86_64.tar.gz

- uses: actions/upload-artifact@v4
with:
name: live_compositor_with_web_renderer_linux_x86_64.tar.gz
path: live_compositor_with_web_renderer_linux_x86_64.tar.gz
name: smelter_with_web_renderer_linux_x86_64.tar.gz
path: smelter_with_web_renderer_linux_x86_64.tar.gz

linux-aarch64:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -80,8 +75,8 @@ jobs:
cp *.tar.gz /artifacts
- uses: actions/upload-artifact@v4
with:
name: live_compositor_linux_aarch64.tar.gz
path: artifacts/live_compositor_linux_aarch64.tar.gz
name: smelter_linux_aarch64.tar.gz
path: artifacts/smelter_linux_aarch64.tar.gz

macos_x86_64:
runs-on: macos-12
Expand All @@ -100,13 +95,13 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: live_compositor_darwin_x86_64.tar.gz
path: live_compositor_darwin_x86_64.tar.gz
name: smelter_darwin_x86_64.tar.gz
path: smelter_darwin_x86_64.tar.gz

- uses: actions/upload-artifact@v4
with:
name: live_compositor_with_web_renderer_darwin_x86_64.tar.gz
path: live_compositor_with_web_renderer_darwin_x86_64.tar.gz
name: smelter_with_web_renderer_darwin_x86_64.tar.gz
path: smelter_with_web_renderer_darwin_x86_64.tar.gz

macos-aarch64:
runs-on: macos-14
Expand All @@ -125,13 +120,13 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: live_compositor_darwin_aarch64.tar.gz
path: live_compositor_darwin_aarch64.tar.gz
name: smelter_darwin_aarch64.tar.gz
path: smelter_darwin_aarch64.tar.gz

- uses: actions/upload-artifact@v4
with:
name: live_compositor_with_web_renderer_darwin_aarch64.tar.gz
path: live_compositor_with_web_renderer_darwin_aarch64.tar.gz
name: smelter_with_web_renderer_darwin_aarch64.tar.gz
path: smelter_with_web_renderer_darwin_aarch64.tar.gz

docker:
runs-on: ubuntu-latest
Expand All @@ -143,12 +138,12 @@ jobs:
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: 🔨 Build Live Compositor image
- name: 🔨 Build Smelter image
run: |
docker buildx build --platform linux/amd64 -t ghcr.io/software-mansion/live-compositor:${{ github.sha }} -f build_tools/docker/slim.Dockerfile .
docker buildx build --platform linux/amd64 -t ghcr.io/software-mansion/smelter:${{ github.sha }} -f build_tools/docker/slim.Dockerfile .
- name: 📤 Upload image
run: docker push ghcr.io/software-mansion/live-compositor:${{ github.sha }}
run: docker push ghcr.io/software-mansion/smelter:${{ github.sha }}

docker-with-web-renderer:
runs-on: ubuntu-latest
Expand All @@ -160,9 +155,9 @@ jobs:
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: 🔨 Build Live Compositor with Web Renderer image
- name: 🔨 Build Smelter with Web Renderer image
run: |
docker buildx build --platform linux/amd64 -t ghcr.io/software-mansion/live-compositor:${{ github.sha }}-web-renderer -f build_tools/docker/full.Dockerfile .
docker buildx build --platform linux/amd64 -t ghcr.io/software-mansion/smelter:${{ github.sha }}-web-renderer -f build_tools/docker/full.Dockerfile .
- name: 📤 Upload image
run: docker push ghcr.io/software-mansion/live-compositor:${{ github.sha }}-web-renderer
run: docker push ghcr.io/software-mansion/smelter:${{ github.sha }}-web-renderer
26 changes: 13 additions & 13 deletions build_tools/docker/full.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:noble-20240423 as builder

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG USERNAME=compositor
ARG USERNAME=smelter
ARG RUST_VERSION=1.81

ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -27,19 +27,19 @@ RUN source ~/.cargo/env && cargo build --release
# Runtime image
FROM ubuntu:noble-20240423

LABEL org.opencontainers.image.source https://github.com/software-mansion/live-compositor
LABEL org.opencontainers.image.source https://github.com/software-mansion/smelter

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG USERNAME=compositor
ARG USERNAME=smelter

ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility

ENV LIVE_COMPOSITOR_MAIN_EXECUTABLE_PATH=/home/$USERNAME/live_compositor/main_process
ENV LIVE_COMPOSITOR_PROCESS_HELPER_PATH=/home/$USERNAME/live_compositor/process_helper
ENV LD_LIBRARY_PATH=/home/$USERNAME/live_compositor/lib
ENV XDG_RUNTIME_DIR=/home/$USERNAME/live_compositor/xdg_runtime
ENV LIVE_COMPOSITOR_MAIN_EXECUTABLE_PATH=/home/$USERNAME/smelter/main_process
ENV LIVE_COMPOSITOR_PROCESS_HELPER_PATH=/home/$USERNAME/smelter/process_helper
ENV LD_LIBRARY_PATH=/home/$USERNAME/smelter/lib
ENV XDG_RUNTIME_DIR=/home/$USERNAME/smelter/xdg_runtime

RUN apt-get update -y -qq && \
apt-get install -y \
Expand All @@ -50,12 +50,12 @@ RUN apt-get update -y -qq && \
RUN useradd -ms /bin/bash $USERNAME && adduser $USERNAME sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER $USERNAME
RUN mkdir -p /home/$USERNAME/live_compositor/xdg_runtime
WORKDIR /home/$USERNAME/live_compositor
RUN mkdir -p /home/$USERNAME/smelter/xdg_runtime
WORKDIR /home/$USERNAME/smelter

COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/target/release/main_process /home/$USERNAME/live_compositor/main_process
COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/target/release/process_helper /home/$USERNAME/live_compositor/process_helper
COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/target/release/lib /home/$USERNAME/live_compositor/lib
COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/docker/entrypoint.sh /home/$USERNAME/live_compositor/entrypoint.sh
COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/target/release/main_process /home/$USERNAME/smelter/main_process
COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/target/release/process_helper /home/$USERNAME/smelter/process_helper
COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/target/release/lib /home/$USERNAME/smelter/lib
COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/docker/entrypoint.sh /home/$USERNAME/smelter/entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]
14 changes: 7 additions & 7 deletions build_tools/docker/slim.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:noble-20240423 as builder

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG USERNAME=compositor
ARG USERNAME=smelter
ARG RUST_VERSION=1.81

ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -26,11 +26,11 @@ RUN source ~/.cargo/env && cargo build --release --no-default-features
# Runtime image
FROM ubuntu:noble-20240423

LABEL org.opencontainers.image.source https://github.com/software-mansion/live-compositor
LABEL org.opencontainers.image.source https://github.com/software-mansion/smelter

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG USERNAME=compositor
ARG USERNAME=smelter

ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility
Expand All @@ -43,12 +43,12 @@ RUN apt-get update -y -qq && \
RUN useradd -ms /bin/bash $USERNAME && adduser $USERNAME sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER $USERNAME
RUN mkdir -p /home/$USERNAME/live_compositor
WORKDIR /home/$USERNAME/live_compositor
RUN mkdir -p /home/$USERNAME/smelter
WORKDIR /home/$USERNAME/smelter

COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/target/release/main_process /home/$USERNAME/live_compositor/main_process
COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/target/release/main_process /home/$USERNAME/smelter/main_process

ENV LIVE_COMPOSITOR_WEB_RENDERER_ENABLE=0
ENV LIVE_COMPOSITOR_WEB_RENDERER_GPU_ENABLE=0

ENTRYPOINT ["/home/compositor/live_compositor/main_process"]
ENTRYPOINT ["/home/smelter/smelter/main_process"]
32 changes: 16 additions & 16 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ set -u
mkdir -p "$ROOT_DIR/release_tmp"
cd "$ROOT_DIR/release_tmp"

gh run download "$WORKFLOW_RUN_ID" -n live_compositor_linux_x86_64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n live_compositor_linux_aarch64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n live_compositor_darwin_x86_64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n live_compositor_darwin_aarch64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n live_compositor_with_web_renderer_linux_x86_64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n live_compositor_with_web_renderer_darwin_x86_64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n live_compositor_with_web_renderer_darwin_aarch64.tar.gz

IMAGE_NAME="ghcr.io/software-mansion/live-compositor"
gh run download "$WORKFLOW_RUN_ID" -n smelter_linux_x86_64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n smelter_linux_aarch64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n smelter_darwin_x86_64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n smelter_darwin_aarch64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n smelter_with_web_renderer_linux_x86_64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n smelter_with_web_renderer_darwin_x86_64.tar.gz
gh run download "$WORKFLOW_RUN_ID" -n smelter_with_web_renderer_darwin_aarch64.tar.gz

IMAGE_NAME="ghcr.io/software-mansion/smelter"
docker pull "${IMAGE_NAME}:${COMMIT_HASH}"
docker pull "${IMAGE_NAME}:${COMMIT_HASH}-web-renderer"

Expand All @@ -47,12 +47,12 @@ docker push "${IMAGE_NAME}:${RELEASE_TAG}"
docker push "${IMAGE_NAME}:${RELEASE_TAG}-web-renderer"

gh release create "$RELEASE_TAG"
gh release upload "$RELEASE_TAG" live_compositor_linux_x86_64.tar.gz
gh release upload "$RELEASE_TAG" live_compositor_linux_aarch64.tar.gz
gh release upload "$RELEASE_TAG" live_compositor_darwin_x86_64.tar.gz
gh release upload "$RELEASE_TAG" live_compositor_darwin_aarch64.tar.gz
gh release upload "$RELEASE_TAG" live_compositor_with_web_renderer_linux_x86_64.tar.gz
gh release upload "$RELEASE_TAG" live_compositor_with_web_renderer_darwin_x86_64.tar.gz
gh release upload "$RELEASE_TAG" live_compositor_with_web_renderer_darwin_aarch64.tar.gz
gh release upload "$RELEASE_TAG" smelter_linux_x86_64.tar.gz
gh release upload "$RELEASE_TAG" smelter_linux_aarch64.tar.gz
gh release upload "$RELEASE_TAG" smelter_darwin_x86_64.tar.gz
gh release upload "$RELEASE_TAG" smelter_darwin_aarch64.tar.gz
gh release upload "$RELEASE_TAG" smelter_with_web_renderer_linux_x86_64.tar.gz
gh release upload "$RELEASE_TAG" smelter_with_web_renderer_darwin_x86_64.tar.gz
gh release upload "$RELEASE_TAG" smelter_with_web_renderer_darwin_aarch64.tar.gz

rm -rf "$ROOT_DIR/release_tmp"

0 comments on commit 57432c4

Please sign in to comment.