mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
chore: Simplify and speed up windows builds using docker image.
This commit is contained in:
parent
c44930d323
commit
68f4e5c0fa
21
.github/scripts/cmake-windows.sh
vendored
21
.github/scripts/cmake-windows.sh
vendored
|
@ -1,21 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
ACTION="$1"
|
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
NPROC=$(nproc)
|
NPROC=$(nproc)
|
||||||
|
|
||||||
ci_install() {
|
|
||||||
docker build \
|
|
||||||
--build-arg SUPPORT_ARCH_i686="$i686" \
|
|
||||||
--build-arg SUPPORT_ARCH_x86_64="$x86_64" \
|
|
||||||
--build-arg SUPPORT_TEST=true \
|
|
||||||
-t toxcore-"$WINDOWS_ARCH" \
|
|
||||||
other/docker/windows
|
|
||||||
}
|
|
||||||
|
|
||||||
ci_script() {
|
|
||||||
. ".github/scripts/flags-gcc.sh"
|
. ".github/scripts/flags-gcc.sh"
|
||||||
|
|
||||||
# Allows wine to display source code file names and line numbers on crash in
|
# Allows wine to display source code file names and line numbers on crash in
|
||||||
|
@ -38,11 +26,4 @@ ci_script() {
|
||||||
-v "$PWD:/toxcore" \
|
-v "$PWD:/toxcore" \
|
||||||
-v "$PWD/result:/prefix" \
|
-v "$PWD/result:/prefix" \
|
||||||
--rm \
|
--rm \
|
||||||
toxcore-"$WINDOWS_ARCH"
|
"toxchat/windows:$WINDOWS_ARCH"
|
||||||
}
|
|
||||||
|
|
||||||
if [ "-z" "$ACTION" ]; then
|
|
||||||
"ci_script"
|
|
||||||
else
|
|
||||||
"ci_$ACTION"
|
|
||||||
fi
|
|
||||||
|
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -47,8 +47,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Docker Build
|
|
||||||
run: .github/scripts/cmake-win32 install
|
|
||||||
- name: Cross compilation
|
- name: Cross compilation
|
||||||
run: .github/scripts/cmake-win32 script
|
run: .github/scripts/cmake-win32 script
|
||||||
|
|
||||||
|
@ -56,8 +54,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Docker Build
|
|
||||||
run: .github/scripts/cmake-win64 install
|
|
||||||
- name: Cross compilation
|
- name: Cross compilation
|
||||||
run: .github/scripts/cmake-win64 script
|
run: .github/scripts/cmake-win64 script
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user