Skip to content

Commit

Permalink
project change: vial-web now builds a container.
Browse files Browse the repository at this point in the history
vial-web will now just build a container that
will be used by other projects and people,
namely vial-gui.
  • Loading branch information
ilc committed Aug 18, 2024
1 parent b8b8f97 commit 422f671
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 1,306 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Push Container

on:
push:
branches: [ web ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/vial-gui-build:latest


25 changes: 0 additions & 25 deletions .github/workflows/main.yml

This file was deleted.

26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ubuntu:22.04

ENV TZ=Etc/UTC
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update && apt-get install -y python3 build-essential libffi-dev git curl wget zlib1g-dev zip unzip

RUN apt-get install -y gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev

RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 20 && \
update-alternatives --config python

COPY . /vial-web

WORKDIR /vial-web

RUN git clone https://github.com/svalboard/via-keymap-precompiled.git

RUN echo 'source "/vial-web/emsdk/emsdk_env.sh"' >> $HOME/.bash_profile

RUN ./fetch-emsdk.sh
RUN ./fetch-deps.sh
RUN ./build-deps.sh
12 changes: 6 additions & 6 deletions fetch-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ source ./version.sh
mkdir -p sources && cd sources

# XZ
wget https://github.com/vial-kb/vial-deps/releases/download/v1/xz-${XZ_VER}.tar.gz -O xz-${XZ_VER}.tar.gz
wget https://github.com/svalboard/vial-deps/releases/download/v1/xz-${XZ_VER}.tar.gz -O xz-${XZ_VER}.tar.gz
echo "${XZ_HASH} xz-${XZ_VER}.tar.gz" | sha256sum --check

# CPython
wget https://github.com/vial-kb/vial-deps/releases/download/v1/cpython-${CPYTHON_VER}.tar.gz -O cpython-${CPYTHON_VER}.tar.gz
wget https://github.com/svalboard/vial-deps/releases/download/v1/cpython-${CPYTHON_VER}.tar.gz -O cpython-${CPYTHON_VER}.tar.gz
echo "${CPYTHON_HASH} cpython-${CPYTHON_VER}.tar.gz" | sha256sum --check

# Qt 5
wget https://github.com/vial-kb/vial-deps/releases/download/v1/qt-everywhere-src-${QT_VER}.tar.xz -O qt-everywhere-src-${QT_VER}.tar.xz
wget https://github.com/svalboard/vial-deps/releases/download/v1/qt-everywhere-src-${QT_VER}.tar.xz -O qt-everywhere-src-${QT_VER}.tar.xz
echo "${QT_HASH} qt-everywhere-src-${QT_VER}.tar.xz" | sha256sum --check

# SIP
wget https://github.com/vial-kb/vial-deps/releases/download/v1/sip-${SIP_VER}.tar.gz -O sip-${SIP_VER}.tar.gz
wget https://github.com/svalboard/vial-deps/releases/download/v1/sip-${SIP_VER}.tar.gz -O sip-${SIP_VER}.tar.gz
echo "${SIP_HASH} sip-${SIP_VER}.tar.gz" | sha256sum --check

# PyQt5-sip
wget https://github.com/vial-kb/vial-deps/releases/download/v1/PyQt5_sip-${PYQT5SIP_VER}.tar.gz -O PyQt5_sip-${PYQT5SIP_VER}.tar.gz
wget https://github.com/svalboard/vial-deps/releases/download/v1/PyQt5_sip-${PYQT5SIP_VER}.tar.gz -O PyQt5_sip-${PYQT5SIP_VER}.tar.gz
echo "${PYQT5SIP_HASH} PyQt5_sip-${PYQT5SIP_VER}.tar.gz" | sha256sum --check

# PyQt5
wget https://github.com/vial-kb/vial-deps/releases/download/v1/PyQt5-${PYQT5_VER}.tar.gz -O PyQt5-${PYQT5_VER}.tar.gz
wget https://github.com/svalboard/vial-deps/releases/download/v1/PyQt5-${PYQT5_VER}.tar.gz -O PyQt5-${PYQT5_VER}.tar.gz
echo "${PYQT5_HASH} PyQt5-${PYQT5_VER}.tar.gz" | sha256sum --check

echo "All OK. Now run ./build-deps.sh"
100 changes: 0 additions & 100 deletions src/build.sh

This file was deleted.

Binary file removed src/icon.png
Binary file not shown.
Loading

0 comments on commit 422f671

Please sign in to comment.