File tree 3 files changed +34
-29
lines changed
3 files changed +34
-29
lines changed Original file line number Diff line number Diff line change
1
+ name : build
2
+ on : [push, pull_request]
3
+ jobs :
4
+ build :
5
+ runs-on : ubuntu-latest
6
+ strategy :
7
+ matrix :
8
+ python-version : [ 3.6.12, 3.7.9, 3.8.6, 3.9.0 ]
9
+ arch : [ amd64, aarch64 ]
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - name : Setup QEMU
13
+ if : matrix.arch != 'amd64'
14
+ uses : docker/setup-qemu-action@v1
15
+ with :
16
+ platforms : all
17
+ - name : Setup Docker buildx
18
+ if : matrix.arch != 'amd64'
19
+ uses : docker/setup-buildx-action@v1
20
+ with :
21
+ install : true
22
+ - name : Download docker image
23
+ run : docker pull dmoj/runtimes-tier1:${{ matrix.arch }}-latest
24
+ - name : Build python
25
+ run : |
26
+ PYTHON_DIR="python$(echo "${{ matrix.python-version }}" | cut -d. -f 1-2)"
27
+ PYTHON_URL="https://www.python.org/ftp/python/$(perl -e 'shift=~/([\d.]+)/;print$1' "${{ matrix.python-version }}")/Python-${{ matrix.python-version }}.tar.xz"
28
+ docker run -e ARCH="${{ matrix.arch }}" -e PYTHON_DIR="$PYTHON_DIR" -e PYTHON_URL="$PYTHON_URL" -v "$(pwd):/code" dmoj/runtimes-tier1:${{ matrix.arch }}-latest
29
+ - name : Archive build artifacts
30
+ uses : actions/upload-artifact@v2
31
+ with :
32
+ name : Python ${{ matrix.python-version }} (${{ matrix.arch }})
33
+ path : python*.tar.gz
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ mkdir "$PYTHON_DIR"
7
7
echo " Downloading $PYTHON_URL to $PYTHON_DIR ..."
8
8
curl -L " $PYTHON_URL " | tar -xJ -C " $PYTHON_DIR " --strip-components=1
9
9
cd " $PYTHON_DIR "
10
- ./configure --prefix=/code/" $PYTHON_DIR " -- enable-optimizations
10
+ ./configure --prefix=/code/" $PYTHON_DIR " $( if [ " $ARCH " = amd64 -a " $( echo " $PYTHON_DIR " | cut -d. -f2 ) " -ge 8 ] ; then echo -- enable-optimizations; fi )
11
11
make -j" $( nproc) "
12
12
make install
13
13
cd /code && tar czvf " $PYTHON_DIR -$ARCH .tar.gz" " $PYTHON_DIR "
You can’t perform that action at this time.
0 commit comments