mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-22 16:24:27 +01:00
Merge pull request #694 from bensuperpc/fix_error
Fixed errors that can sometimes occur with the CI and Improve CI
This commit is contained in:
commit
7a4634c4f8
61
.github/workflows/main.yml
vendored
61
.github/workflows/main.yml
vendored
@ -18,24 +18,45 @@ jobs:
|
|||||||
name: base
|
name: base
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: "recursive"
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: make base
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
timeout_minutes: 120
|
||||||
|
retry_wait_seconds: 40
|
||||||
|
max_attempts: 3
|
||||||
|
retry_on: error
|
||||||
|
command: make base
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
run: make base.test
|
run: make base.test
|
||||||
|
|
||||||
- name: archive base
|
- name: archive base
|
||||||
run: |
|
run: |
|
||||||
mkdir -p cache
|
mkdir -p cache
|
||||||
docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz
|
docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz
|
||||||
|
|
||||||
- name: save base
|
- name: save base
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cache
|
name: cache
|
||||||
path: ./cache
|
path: ./cache
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
timeout_minutes: 30
|
||||||
|
retry_wait_seconds: 30
|
||||||
|
max_attempts: 4
|
||||||
|
retry_on: error
|
||||||
|
command: |
|
||||||
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
|
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
|
||||||
docker image push dockcross/base --all-tags
|
docker image push dockcross/base --all-tags
|
||||||
|
|
||||||
@ -833,17 +854,32 @@ jobs:
|
|||||||
cpython_arg: "",
|
cpython_arg: "",
|
||||||
}
|
}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: "recursive"
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cache
|
name: cache
|
||||||
path: ./cache
|
path: ./cache
|
||||||
|
|
||||||
- name: load base
|
- name: load base
|
||||||
run: xz -d -k < ./cache/base.tar.xz | docker load
|
run: xz -d -k < ./cache/base.tar.xz | docker load
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: make ${{ matrix.arch_name.image }}
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
timeout_minutes: 360
|
||||||
|
retry_wait_seconds: 20
|
||||||
|
max_attempts: 3
|
||||||
|
retry_on: error
|
||||||
|
command: make ${{ matrix.arch_name.image }}
|
||||||
|
|
||||||
- name: basic test
|
- name: basic test
|
||||||
run: make ${{ matrix.arch_name.image }}.test
|
run: make ${{ matrix.arch_name.image }}.test
|
||||||
|
|
||||||
# Updated on 19/05/2022
|
# Updated on 19/05/2022
|
||||||
- name: stockfish build test
|
- name: stockfish build test
|
||||||
if: ${{ matrix.arch_name.stockfish == 'yes' }}
|
if: ${{ matrix.arch_name.stockfish == 'yes' }}
|
||||||
@ -855,12 +891,14 @@ jobs:
|
|||||||
cd ../..
|
cd ../..
|
||||||
rm -rf Stockfish
|
rm -rf Stockfish
|
||||||
# Updated on 19/05/2022
|
# Updated on 19/05/2022
|
||||||
|
|
||||||
- name: ninja build test
|
- name: ninja build test
|
||||||
if: ${{ matrix.arch_name.ninja == 'yes' }}
|
if: ${{ matrix.arch_name.ninja == 'yes' }}
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 --branch v1.11.0 https://github.com/ninja-build/ninja.git
|
git clone --depth 1 --branch v1.11.0 https://github.com/ninja-build/ninja.git
|
||||||
cd ninja
|
cd ninja
|
||||||
./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.ninja_arg }}
|
./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.ninja_arg }}
|
||||||
|
|
||||||
# Updated on 19/05/2022
|
# Updated on 19/05/2022
|
||||||
- name: openssl build test
|
- name: openssl build test
|
||||||
if: ${{ matrix.arch_name.openssl == 'yes' }}
|
if: ${{ matrix.arch_name.openssl == 'yes' }}
|
||||||
@ -873,6 +911,7 @@ jobs:
|
|||||||
./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2
|
./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf openssl
|
rm -rf openssl
|
||||||
|
|
||||||
# Updated on 19/05/2022
|
# Updated on 19/05/2022
|
||||||
- name: C build test
|
- name: C build test
|
||||||
if: ${{ matrix.arch_name.C == 'yes' }}
|
if: ${{ matrix.arch_name.C == 'yes' }}
|
||||||
@ -883,6 +922,7 @@ jobs:
|
|||||||
./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.C_arg }}
|
./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.C_arg }}
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf C
|
rm -rf C
|
||||||
|
|
||||||
# Updated on 19/05/2022
|
# Updated on 19/05/2022
|
||||||
- name: C-Plus-Plus build test
|
- name: C-Plus-Plus build test
|
||||||
if: ${{ matrix.arch_name.C-Plus-Plus == 'yes' }}
|
if: ${{ matrix.arch_name.C-Plus-Plus == 'yes' }}
|
||||||
@ -893,6 +933,7 @@ jobs:
|
|||||||
./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.C-Plus-Plus_arg }}
|
./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.C-Plus-Plus_arg }}
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf C-Plus-Plus
|
rm -rf C-Plus-Plus
|
||||||
|
|
||||||
# Updated on 19/05/2022
|
# Updated on 19/05/2022
|
||||||
- name: fmt build test
|
- name: fmt build test
|
||||||
if: ${{ matrix.arch_name.fmt == 'yes' }}
|
if: ${{ matrix.arch_name.fmt == 'yes' }}
|
||||||
@ -902,6 +943,7 @@ jobs:
|
|||||||
./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.fmt_arg }} -DFMT_DOC=OFF
|
./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.fmt_arg }} -DFMT_DOC=OFF
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf fmt
|
rm -rf fmt
|
||||||
|
|
||||||
# Updated on 19/05/2022
|
# Updated on 19/05/2022
|
||||||
- name: cpython build test
|
- name: cpython build test
|
||||||
if: ${{ matrix.arch_name.cpython == 'yes' }}
|
if: ${{ matrix.arch_name.cpython == 'yes' }}
|
||||||
@ -912,8 +954,15 @@ jobs:
|
|||||||
./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2
|
./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf cpython
|
rm -rf cpython
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
uses: nick-fields/retry@v2
|
||||||
|
with:
|
||||||
|
timeout_minutes: 30
|
||||||
|
retry_wait_seconds: 30
|
||||||
|
max_attempts: 4
|
||||||
|
retry_on: error
|
||||||
|
command: |
|
||||||
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
|
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
|
||||||
docker image push dockcross/${{ matrix.arch_name.image }} --all-tags
|
docker image push dockcross/${{ matrix.arch_name.image }} --all-tags
|
||||||
|
Loading…
Reference in New Issue
Block a user