Skip to content

Commit

Permalink
Merge branch 'fix-actions'
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzz committed Sep 12, 2024
2 parents 2213e7c + ceab14c commit fb6588b
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 32 deletions.
35 changes: 3 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,19 @@ jobs:
build-linux:
runs-on: ubuntu-22.04

container:
image: ubuntu:18.04
options: --privileged
env:
LD_LIBRARY_PATH: /__w/vial-gui/vial-gui/util/python36/prefix/lib/

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
apt-get update
apt-get install -y libusb-1.0-0-dev libudev-dev ruby ruby-dev rubygems build-essential desktop-file-utils wget unzip zlib1g-dev liblzma-dev libssl-dev git imagemagick file libfuse2
wget https://github.com/AppImage/pkg2appimage/archive/38603d92359a48189c35debad9005e8e902e6070.zip
unzip *.zip
gem install --no-document fpm
- name: Set up Python 3.6
run: ./util/setup_python36.sh

- name: Setup venv
run: |
./util/python36/prefix/bin/python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
- name: Build
run: |
. venv/bin/activate
fbs freeze
fbs installer
deactivate
./pkg2appimage-*/pkg2appimage misc/Vial.yml
mv out/Vial-*.AppImage out/Vial-x86_64.AppImage
run: ./util/linux-builder/build-in-docker.sh

- uses: actions/upload-artifact@v3
with:
name: vial-linux
path: out/Vial-x86_64.AppImage
path: util/linux-builder/output/Vial-x86_64.AppImage

build-mac:
runs-on: macos-11
runs-on: macos-12
env:
PYTHON_VERSION: 3.6.8
MACOSX_DEPLOYMENT_TARGET: 10.9
Expand Down
1 change: 1 addition & 0 deletions util/linux-builder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
output
14 changes: 14 additions & 0 deletions util/linux-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:18.04

RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y libusb-1.0-0-dev libudev-dev ruby ruby-dev rubygems build-essential desktop-file-utils wget unzip zlib1g-dev liblzma-dev libssl-dev git imagemagick file libfuse2

RUN wget https://github.com/AppImage/pkg2appimage/archive/38603d92359a48189c35debad9005e8e902e6070.zip && \
unzip *.zip && \
gem install dotenv -v 2.8.1 && \
gem install --no-document fpm && \
fpm --version

COPY . /vial-gui

RUN /vial-gui/util/setup_python36.sh
15 changes: 15 additions & 0 deletions util/linux-builder/_builder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -e

export LD_LIBRARY_PATH=/vial-gui/util/python36/prefix/lib/

cd /vial-gui
./util/python36/prefix/bin/python3 -m venv docker_venv
. docker_venv/bin/activate
pip install -r requirements.txt
fbs freeze
fbs installer
deactivate
/pkg2appimage-*/pkg2appimage misc/Vial.yml
mv out/Vial-*.AppImage /output/Vial-x86_64.AppImage
16 changes: 16 additions & 0 deletions util/linux-builder/build-in-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

HERE=$(cd "$(dirname "$0")" && pwd)

cd $HERE
rm -rf output && mkdir -p output

cd $HERE/../..

docker build -t vialguibuilder:latest -f util/linux-builder/Dockerfile .
docker run --privileged --rm -v $(realpath util/linux-builder/output):/output vialguibuilder:latest bash /vial-gui/util/linux-builder/_builder.sh

cd $HERE
ls -lah output

0 comments on commit fb6588b

Please sign in to comment.