Update Windows SWIG build job to use caching
This commit is contained in:
parent
9639a27929
commit
b542e9e469
28
.github/workflows/build-and-test.yml
vendored
28
.github/workflows/build-and-test.yml
vendored
@ -25,29 +25,43 @@ jobs:
|
|||||||
name: "Lin|Build SWIG for Windows"
|
name: "Lin|Build SWIG for Windows"
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
env:
|
||||||
CFLAGS: "-static-libgcc -static-libstdc++"
|
swig_hash: "90cdbee6a69d13b39d734083b9f91069533b0d7b"
|
||||||
CXXFLAGS: "-static-libgcc -static-libstdc++"
|
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
|
||||||
sudo apt-get install -y --no-install-recommends autoconf automake bison build-essential mingw-w64
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: "lissyx/swig"
|
repository: "swig/swig"
|
||||||
ref: "fec7d5d3179833e37759ffc6532f86344982e26a"
|
ref: ${{ env.swig_hash }}
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p build-static/
|
mkdir -p build-static/
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
id: swig-build-cache
|
||||||
|
with:
|
||||||
|
path: build-static/
|
||||||
|
key: swig-win-3-${{ env.swig_hash }}
|
||||||
|
- run: |
|
||||||
|
sudo apt-get install -y --no-install-recommends autoconf automake bison build-essential mingw-w64
|
||||||
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
||||||
- run: |
|
- run: |
|
||||||
curl -sSL https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz > pcre-8.43.tar.gz
|
curl -sSL https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz > pcre-8.43.tar.gz
|
||||||
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
||||||
|
- run: |
|
||||||
./Tools/pcre-build.sh --host=x86_64-w64-mingw32
|
./Tools/pcre-build.sh --host=x86_64-w64-mingw32
|
||||||
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
||||||
- run: |
|
- run: |
|
||||||
sh autogen.sh
|
sh autogen.sh
|
||||||
./configure --host=x86_64-w64-mingw32 \
|
CFLAGS="-static-libgcc -static-libstdc++" \
|
||||||
|
CXXFLAGS="-static-libgcc -static-libstdc++" \
|
||||||
|
./configure \
|
||||||
|
--host=x86_64-w64-mingw32 \
|
||||||
--prefix=`pwd`/build-static/ \
|
--prefix=`pwd`/build-static/ \
|
||||||
--program-prefix=ds-
|
--program-prefix=ds-
|
||||||
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
||||||
- run: |
|
- run: |
|
||||||
make -j
|
make -j
|
||||||
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
||||||
- run: |
|
- run: |
|
||||||
make install
|
make install
|
||||||
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
name: ${{ github.job }}
|
||||||
|
Loading…
Reference in New Issue
Block a user