From 02cce8024d0e91036266cae310ed8d24f9c64d17 Mon Sep 17 00:00:00 2001 From: capellancitizen Date: Tue, 13 Aug 2024 11:27:33 -0400 Subject: CI: Added pytest, some speed improvements (#3135) Geos build is now cached, and its tests are no longer built. --- .github/workflows/build.yml | 53 ++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 20 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8639c0cd..f664d594 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,12 +16,6 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.9.x' - - uses: actions/setup-node@v4 - with: - node-version: 20 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.1 - uses: actions/cache@v4 id: pip-cache with: @@ -29,6 +23,13 @@ jobs: key: ${{ runner.os }}-20.04-pip-${{ hashFiles('**/requirements.txt') }} restore-keys: | ${{ runner.os }}-20.04-pip- + - uses: actions/cache@v4 + id: geos-build-cache + with: + path: geos/build + key: ${{ runner.os }}-20.04-geos-build-${{ hashFiles('bin/build-linux') }} + restore-keys: | + ${{ runner.os }}-20.04-geos-build- - name: install dependencies shell: bash @@ -88,13 +89,17 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/setup-node@v4 - with: - node-version: 20 - uses: actions/setup-python@v5 with: python-version: '3.8.x' architecture: 'x86' + - uses: actions/cache@v4 + id: geos-build-cache + with: + path: geos + key: win32-geos-build-${{ hashFiles('bin/geos-win.cmd') }} + restore-keys: | + win32-geos-build- - uses: microsoft/setup-msbuild@v2 - name: Setup Git for Windows SDK uses: git-for-windows/setup-git-for-windows-sdk@v1.10.0 @@ -125,6 +130,9 @@ jobs: run: | SET BUILD32="1" bin\build-geos-win.cmd + - shell: bash + run: | + pytest - shell: bash run: | make dist @@ -154,13 +162,17 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/setup-node@v4 - with: - node-version: 20 - uses: actions/setup-python@v5 with: python-version: '3.8.x' architecture: 'x64' + - uses: actions/cache@v4 + id: geos-build-cache + with: + path: geos + key: win64-geos-build-${{ hashFiles('bin/geos-win.cmd') }} + restore-keys: | + win64-geos-build- - uses: microsoft/setup-msbuild@v2 - name: Setup Git for Windows SDK uses: git-for-windows/setup-git-for-windows-sdk@v1.10.0 @@ -185,6 +197,9 @@ jobs: shell: cmd run: | bin\build-geos-win.cmd + - shell: bash + run: | + pytest - shell: bash run: | make dist @@ -217,9 +232,6 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.9.x' - - uses: actions/setup-node@v4 - with: - node-version: 20 - name: install dependencies shell: bash run: | @@ -252,6 +264,9 @@ jobs: pip install pyinstaller echo "${{ env.pythonLocation }}/bin" >> $GITHUB_PATH + - shell: bash + run: | + pytest - shell: bash run: | make dist @@ -265,7 +280,6 @@ jobs: NOTARY_ACCOUNT: ${{ secrets.INKSTITCH_NOTARIZE_AC }} NOTARY_PASSWORD: ${{ secrets.INKSTITCH_NOTARIZE_PASS }} - - uses: actions/upload-artifact@v4 with: name: inkstitch-mac-x86 @@ -279,9 +293,6 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.9.x' - - uses: actions/setup-node@v4 - with: - node-version: 20 - name: install dependencies shell: bash run: | @@ -314,6 +325,9 @@ jobs: pip install pyinstaller echo "${{ env.pythonLocation }}/bin" >> $GITHUB_PATH + - shell: bash + run: | + pytest - shell: bash run: | make dist @@ -327,7 +341,6 @@ jobs: NOTARY_ACCOUNT: ${{ secrets.INKSTITCH_NOTARIZE_AC }} NOTARY_PASSWORD: ${{ secrets.INKSTITCH_NOTARIZE_PASS }} - - uses: actions/upload-artifact@v4 with: name: inkstitch-mac-arm64 -- cgit v1.2.3