Check out SDL sources only once

This prevents weird issues where a commit can happen between when the
i386 binaries are built and when amd64 binaries are built, and also
speeds up the workflow a bit.
This commit is contained in:
Tudor Brindus 2020-05-06 16:06:32 -04:00
parent 6dba3318fa
commit 0c9a67cd45
2 changed files with 7 additions and 4 deletions

View file

@ -7,19 +7,22 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Check out SDL sources
run: |
hg clone https://hg.libsdl.org/SDL /tmp/SDL
- name: Build i386 binaries - name: Build i386 binaries
run: | run: |
mkdir /tmp/i386 mkdir /tmp/i386
cd linux-build cd linux-build
docker build -t sdl2-i386 -f Dockerfile.i386 . docker build -t sdl2-i386 -f Dockerfile.i386 .
docker run -v `pwd`/compile:/entry -v /tmp/i386:/io sdl2-i386 docker run -v `pwd`/compile:/entry -v /tmp/i386:/io -v /tmp/SDL:/src sdl2-i386
cp /tmp/i386/lib/libSDL2-2.0.so.0 ../native/linux-x86 cp /tmp/i386/lib/libSDL2-2.0.so.0 ../native/linux-x86
- name: Build amd64 binaries - name: Build amd64 binaries
run: | run: |
mkdir /tmp/amd64 mkdir /tmp/amd64
cd linux-build cd linux-build
docker build -t sdl2-amd64 -f Dockerfile.amd64 . docker build -t sdl2-amd64 -f Dockerfile.amd64 .
docker run -v `pwd`/compile:/entry -v /tmp/amd64:/io sdl2-amd64 docker run -v `pwd`/compile:/entry -v /tmp/amd64:/io -v /tmp/SDL:/src sdl2-amd64
cp /tmp/amd64/lib/libSDL2-2.0.so.0 ../native/linux-x64 cp /tmp/amd64/lib/libSDL2-2.0.so.0 ../native/linux-x64
- name: Create pull request - name: Create pull request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v2

View file

@ -2,8 +2,8 @@
set -euf -o pipefail set -euf -o pipefail
hg clone https://hg.libsdl.org/SDL SDL cd /src
cd SDL rm -rf build
mkdir build mkdir build
cd build cd build
../configure --prefix=/io ../configure --prefix=/io