summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml127
1 files changed, 60 insertions, 67 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 76f221a9..0da74dee 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,156 +10,149 @@ jobs:
linux:
runs-on: ubuntu-16.04
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
with:
submodules: recursive
+ - uses: actions/setup-python@v2
+ with:
+ python-version: '3.9'
- uses: actions/setup-node@v1
with:
- node-version: '11.x'
- - name: download dependencies
- shell: bash
- run: |
- curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2
+ node-version: '15.x'
+
+ - uses: actions/cache@v2
+ id: pip-cache
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-16.04-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-16.04-pip-
+
+ - name: Get yarn cache directory path
+ id: yarn-cache-dir-path
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+
+ - uses: actions/cache@v2
+ id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
+ with:
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
- name: install dependencies
shell: bash
run: |
- # I'd love to use a setup-python action but it seems to give a
- # python that doesn't support unicode. See:
- # https://github.com/actions/setup-python/issues/23
-
sudo apt-get update
-
- sudo apt-get install python2.7
python -m pip install --upgrade pip
+ python -m pip install wheel
sudo apt-get install gettext
# for wxPython
- sudo apt-get install glib-networking libsdl1.2-dev
+ sudo apt install glib-networking libsdl1.2-dev
# for PyGObject
- sudo apt install libgirepository1.0-dev
+ sudo apt install libgirepository1.0-dev libcairo2-dev
# for shapely
- sudo apt install libgeos-dev
+ sudo apt install libgeos-dev build-essential libgtk-3-dev
uname -a
python --version
python -m pip --version
python -m pip debug
- # wxPython doen't publish linux wheels in pypi
- wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl
- python -m pip install wxPython*.whl
+ python -m pip install pycairo==1.11.1
+ python -m pip install PyGObject==3.30.5
- python -m pip install PyGObject
+ # colormath - last official release: 3.0.0
+ # we need already submitted fixes - so let's grab them from the github repository
+ python -m pip install git+https://github.com/gtaylor/python-colormath
python -m pip install -r requirements.txt
- python -m pip install pyinstaller==3.3.1
+ python -m pip install pyinstaller
- tar -jxf inkscape-0.92.3.tar.bz2
- rm inkscape-0.92.3.tar.bz2
- mv inkscape-0.92.3 inkscape
-
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
- shell: bash
run: |
make dist
env:
BUILD: linux
- - uses: actions/upload-artifact@master
+ - uses: actions/upload-artifact@v2
with:
name: inkstitch-linux
path: artifacts
windows:
runs-on: windows-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-node@v1
with:
- node-version: '11.x'
- - uses: actions/setup-python@v1
+ node-version: '15.x'
+ - uses: actions/setup-python@v2
with:
- python-version: '2.7.x'
+ python-version: '3.9'
architecture: 'x86'
- uses: microsoft/setup-msbuild@v1.0.2
- - name: download dependencies
- shell: bash
- run: |
- curl -sOL https://github.com/lexelby/inkstitch-build-objects/releases/download/v1.0.0/Shapely-1.6.3-cp27-cp27m-win32.whl
- curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2
- name: install dependencies
shell: bash
run: |
- pip install Shapely-1.6.3-cp27-cp27m-win32.whl
- pip install -r requirements.txt
- pip install pyinstaller==3.3.1
+ python -m pip install --upgrade pip
+ python -m pip install wheel
- # Just using tar -j freezes forever with no output. Heck if I know why. This seems to work.
- bzcat inkscape-0.92.3.tar.bz2 | tar -vxf -
- rm inkscape-0.92.3.tar.bz2
- mv inkscape-0.92.3 inkscape
+ python -m pip install git+https://github.com/gtaylor/python-colormath
+
+ python -m pip install -r requirements.txt
+ python -m pip install pyinstaller
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
- - name: fix geos
- shell: bash
- run: |
- cd "${{ env.pythonLocation }}\Lib/site-packages/shapely/DLLs"
- cp geos_c.dll geos.dll
- shell: bash
run: |
make dist
env:
BUILD: windows
- - uses: actions/upload-artifact@master
+ - uses: actions/upload-artifact@v2
with:
name: inkstitch-windows
path: artifacts
mac:
runs-on: macos-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
with:
submodules: recursive
- - uses: actions/setup-node@v1
+ - uses: actions/setup-python@v2
with:
- node-version: '11.x'
- - uses: actions/setup-python@v1
- with:
- python-version: '2.7.x'
+ python-version: '3.9'
- uses: actions/setup-node@v1
with:
- node-version: '10.x'
- - name: download inkscape
- shell: bash
- run: |
- curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2
+ node-version: '15.x'
- name: install dependencies
shell: bash
run: |
brew update
- # this errors because it installs python3 but python2 is already installed
- brew install gtk+3 pkg-config gobject-introspection libffi gettext || true
+ brew install gtk+3 pkg-config gobject-introspection geos libffi gettext || true
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
-
+
# for msgfmt
echo "/usr/local/opt/gettext/bin" >> $GITHUB_PATH
echo "GI_TYPELIB_PATH=/usr/local/lib/girepository-1.0/" >> $GITHUB_ENV
+ pip install --upgrade pip
pip --version
+ pip install wheel
pip install PyGObject
+ pip install git+https://github.com/gtaylor/python-colormath
+
pip install -r requirements.txt
- pip install pyinstaller==3.3.1
-
- tar -jxf inkscape-0.92.3.tar.bz2
- rm inkscape-0.92.3.tar.bz2
- mv inkscape-0.92.3 inkscape
+ pip install pyinstaller
echo "${{ env.pythonLocation }}/bin" >> $GITHUB_PATH
- shell: bash
@@ -167,7 +160,7 @@ jobs:
make dist
env:
BUILD: osx
- - uses: actions/upload-artifact@master
+ - uses: actions/upload-artifact@v2
with:
name: inkstitch-mac
path: artifacts