-
-
Notifications
You must be signed in to change notification settings - Fork 58
112 lines (107 loc) · 3.82 KB
/
continuous-builds.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Continuous Builds
on:
push:
branches:
- '**'
tags:
- '!**'
jobs:
pytest-ubuntu-focal:
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install -y python3.11 python3-pip python3-pytest fakeroot binutils patchelf git
- uses: actions/checkout@v3
- name: Install appimage-builder
run: |
git config --global --add safe.directory $PWD
git fetch --prune --unshallow
python3 -m pip install -e .[dev]
- name: Run pytest
run: python3 -m unittest
pytest-archlinux:
runs-on: ubuntu-latest
container: archlinux
steps:
- name: Install dependencies
run: pacman -Syu --noconfirm python-pip python-pytest python-setuptools binutils patchelf fakeroot strace patchelf git
- uses: actions/checkout@v3
- name: Install appimage-builder
run: |
git config --global --add safe.directory $PWD
git fetch --prune --unshallow
python3 -m pip install -e .[dev]
- name: Run pytest
run: python3 -m unittest
build:
runs-on: ubuntu-latest
needs: [ pytest-ubuntu-focal, pytest-archlinux ]
steps:
- name: Install dependencies
run: |
sudo apt install -y python3.11-minimal python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace git
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
sudo chmod +x /usr/local/bin/appimagetool
- uses: actions/checkout@v3
- name: Install appimage-builder
run: |
git config --global --add safe.directory $PWD
git fetch --prune --unshallow
sudo python3.11 -m pip install .
- name: Build AppImage
run: |
cd recipes/appimage-builder
export APPIMAGE_BUILDER_VERSION=$(appimage-builder --version | head -1 | cut -f 2 -d" ")
appimage-builder --skip-test
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: appimage-builder
path: 'recipes/appimage-builder/appimage-builder*.AppImage*'
test-pack-bash:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Download AppImage from build job
uses: actions/download-artifact@v2
with:
name: appimage-builder
- name: Install dependencies
run: |
sudo apt install -y adwaita-icon-theme
- name: Pack bash
run: |
# build bash
BUILDER_PATH=$(find $PWD -name appimage-builder-*.AppImage)
chmod +x "$BUILDER_PATH"
cd recipes/bash/
"$BUILDER_PATH" --skip-test
- name: Test bash
run: |
recipes/bash/*.AppImage --appimage-extract-and-run -c "echo Hello World"
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: bash
path: 'recipes/bash/*.AppImage*'
publish:
runs-on: ubuntu-latest
needs: test-pack-bash
if: github.ref == 'refs/heads/main'
steps:
- name: Download AppImage from build job
uses: actions/download-artifact@v2
with:
name: appimage-builder
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: Continuous
files: 'appimage-builder*.AppImage*'