-
Notifications
You must be signed in to change notification settings - Fork 97
93 lines (80 loc) · 2.69 KB
/
main.yml
File metadata and controls
93 lines (80 loc) · 2.69 KB
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
name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
# build at least once a month
- cron: '0 0 1 * *'
jobs:
build-and-test:
strategy:
matrix:
ARCH: [x86_64, i386, armhf, aarch64]
BUILD_TYPE: ["appimage"]
USE_STATIC_RUNTIME: [""]
DISABLE_PUSH: [""]
include:
# test build
- ARCH: x86_64
DOCKER_ARCH: amd64
BUILD_TYPE: coverage
DISABLE_PUSH: 1
# experimental build
- ARCH: x86_64
BUILD_TYPE: appimage
USE_STATIC_RUNTIME: 1
DISABLE_PUSH: 1
fail-fast: false
name: ${{ matrix.BUILD_TYPE }} ${{ matrix.ARCH }} static_runtime=${{ matrix.USE_STATIC_RUNTIME }}
# Ubuntu 22.04 with qemu-static and ldd is a bad combination apparently
runs-on: ubuntu-20.04
env:
ARCH: ${{ matrix.ARCH }}
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
USE_STATIC_RUNTIME: ${{ matrix.USE_STATIC_RUNTIME }}
# make sure to always(!) pull the base image
UPDATE: 1
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up QEMU integration for Docker
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# using such an action is more secure than using custom scripts
- name: Log into quay.io
uses: docker/login-action@v3
# secrets are not available when building a pull request
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSPHRASE }}
registry: quay.io
- name: Build
run: bash ci/build-in-docker.sh
env:
CACHE_FROM: 1
PUSH_IMAGE: ${{ (matrix.DISABLE_PUSH == '' && github.event_name != 'pull_request') && '1' || '' }}
- name: Archive artifacts
uses: actions/upload-artifact@v2
if: matrix.BUILD_TYPE != 'coverage'
with:
name: AppImage
path: linuxdeploy*.AppImage*
upload:
name: Create release and upload artifacts
needs:
- build-and-test
runs-on: ubuntu-20.04
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Inspect directory after downloading artifacts
run: ls -alFR
- name: Create release and upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
chmod +x pyuploadtool-x86_64.AppImage
./pyuploadtool-x86_64.AppImage ./**/linuxdeploy*.AppImage*