Skip to content

Commit fdf8bc9

Browse files
committed
Simplified linux builds
1 parent 66e037f commit fdf8bc9

3 files changed

Lines changed: 14 additions & 36 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,16 @@ on:
99
- 'FiraCode.glyphs'
1010
- 'requirements.txt'
1111
- 'script/**'
12-
12+
1313
jobs:
1414
build:
1515
permissions:
1616
contents: write
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Set up Python 3.12
21-
uses: actions/setup-python@v5
22-
with:
23-
python-version: '3.12'
24-
- name: Install System Dependencies
25-
run: |
26-
sudo apt-get update
27-
sudo apt-get install -y ttfautohint woff2 zlib1g-dev
28-
- name: Install sfnt2woff-zopfli
29-
run: |
30-
git clone https://github.com/bramstein/sfnt2woff-zopfli.git
31-
cd sfnt2woff-zopfli
32-
make
33-
chmod +x sfnt2woff-zopfli
34-
sudo mv sfnt2woff-zopfli /usr/local/bin/sfnt2woff-zopfli
35-
cd ..
36-
rm -rf sfnt2woff-zopfli
37-
- name: Install Python Dependencies
38-
run: |
39-
pip install --upgrade pip
40-
pip install -r requirements.txt
20+
- name: Install Dependencies
21+
run: ./script/bootstrap_linux.sh
4122
- if: startsWith(github.ref, 'refs/tags/')
4223
run: python3 ./script/update_version.py
4324
- run: ./script/build.sh

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,5 @@ FROM python:3
33
WORKDIR /opt
44

55
COPY requirements.txt .
6-
RUN pip install -r requirements.txt
7-
RUN apt-get update && \
8-
apt-get install -y ttfautohint && \
9-
apt-get install -y woff2 && \
10-
apt-get install -y sfnt2woff-zopfli
6+
COPY script/bootstrap_linux.sh script/
7+
RUN script/bootstrap_linux.sh

script/bootstrap_linux.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
22
set -o errexit -o nounset -o pipefail
3-
cd "`dirname $0`/.."
3+
cd "$(dirname "$0")/.."
44

5-
sudo apt update
6-
sudo apt install -y python3.8 python3-setuptools python3.8-dev pkg-config zlib1g ttfautohint woff2 sfnt2woff-zopfli
5+
if [ "$(id -u)" -eq 0 ]; then
6+
SUDO=""
7+
else
8+
SUDO="sudo"
9+
fi
710

8-
sudo python3.8 -m easy_install pip
9-
python3.8 -m pip install virtualenv --user
10-
python3.8 -m virtualenv venv
11-
source venv/bin/activate
11+
$SUDO apt-get update
12+
$SUDO apt-get install -y pkg-config zlib1g-dev ttfautohint woff2 sfnt2woff-zopfli
1213

13-
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
14-
python3.8 -m pip install -r requirements.txt
14+
pip install -r requirements.txt

0 commit comments

Comments
 (0)