Skip to content

Commit 38f6182

Browse files
authored
Merge pull request #96 from ImageMarkup/ci
Build linux specifically on Ubuntu 20
2 parents e72e5b2 + 12ae022 commit 38f6182

1 file changed

Lines changed: 55 additions & 3 deletions

File tree

.github/workflows/package.yml

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,65 @@ on:
33
release:
44
types: [published]
55
jobs:
6-
package:
6+
# Use an older Linux: https://pyinstaller.org/en/stable/usage.html#making-gnu-linux-apps-forward-compatible
7+
# Ubuntu 20.04 isn't supported by GitHub Actions.
8+
package-linux:
9+
runs-on: ubuntu-latest
10+
container:
11+
image: ubuntu:20.04
12+
steps:
13+
# include binutils, pyinstaller needs objdump
14+
- name: Install dependencies
15+
run: |
16+
apt-get update
17+
apt-get install -y git zip curl binutils
18+
19+
- name: Install uv
20+
run: |
21+
curl -LsSf https://astral.sh/uv/install.sh | sh
22+
23+
# the checkout action has to be after a newer version of git is installed
24+
# see https://github.com/actions/checkout/issues/335. we need the git directory
25+
# for setuptools-scm to work.
26+
- uses: actions/checkout@v3
27+
28+
# the setup-python action doesn't work due to the older version of glibc
29+
# see https://github.com/actions/setup-python/issues/1053
30+
- name: Set up Python
31+
run: |
32+
uv python install 3.10
33+
ln -s $(uv python find 3.10) /usr/bin/python
34+
ln -s $(dirname $(uv python find 3.10))/pip /usr/bin/pip
35+
36+
- name: Run packaging step
37+
run: |
38+
uvx tox -e package
39+
40+
- name: Install GitHub CLI
41+
run: |
42+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
43+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
44+
apt-get update
45+
apt-get install -y gh
46+
47+
# this is needed when building in docker since the repo is cloned as root.
48+
# see https://stackoverflow.com/questions/73408170/git-fatal-detected-dubious-ownership
49+
- name: Allow git to run against root owned files
50+
run: |
51+
git config --global --add safe.directory $(pwd)
52+
53+
- name: Zip and upload binary
54+
run: |
55+
.github/zip_and_upload_package.sh Linux ${{ github.event.release.tag_name }}
56+
shell: bash
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
60+
package-macos-windows:
761
runs-on: ${{ matrix.os }}
862
strategy:
963
matrix:
1064
os:
11-
# Use an older Linux: https://pyinstaller.org/en/stable/usage.html#making-gnu-linux-apps-forward-compatible
12-
- ubuntu-20.04
1365
- macos-latest
1466
- windows-latest
1567
steps:

0 commit comments

Comments
 (0)