Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Update build to work with newer docker. #146

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions .github/workflows/build-and-deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
ext: ""
- target: linux-i686
os: linux
arch: i686
arch: i386
base-image: ubuntu-latest
build-image: i386/debian:stable
ext: ""
- target: linux-armhf
os: linux
arch: armhf
arch: arm/v7
base-image: ubuntu-latest
build-image: arm32v7/debian:stable
ext: ""
- target: linux-aarch64
os: linux
arch: aarch64
arch: arm64
base-image: ubuntu-latest
build-image: arm64v8/debian:stable
ext: ""
Expand All @@ -50,27 +50,26 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: matrix.os == 'linux'
- name: Prepare Build Environemnt
shell: bash
run: |
if ${{ matrix.os == 'linux' }}; then
sudo apt-get update
sudo apt-get -y install qemu-system-arm qemu-user-static
else
sudo apt-get update
sudo apt-get -y install build-essential cmake gcc-i686-linux-gnu
sudo apt-get -y install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
sudo apt-get -y install gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
fi
run: sudo apt-get update -qq && sudo apt-get -qq --no-install-recommends install build-essential cmake gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
if: matrix.os == 'windows'
- name: Build
shell: bash
run: |
if ${{ matrix.os == 'linux' }}; then
docker pull ${{ matrix.build-image }}
docker run --net=host --rm --device /dev/fuse -v $PWD:/mvdsv ${{ matrix.build-image }} bash -c -e 'export ARCH=$(dpkg --print-architecture);export DEBIAN_FRONTEND=noninteractive;mkdir -p /etc/apt/apt.conf.d;echo "APT::Install-Recommends "0"; APT::AutoRemove::RecommendsImportant "false";" >> /etc/apt/apt.conf.d/01lean && apt-get -qqy update && apt-get -qqy dist-upgrade && apt-get -qqy install cmake build-essential libcurl4-openssl-dev && ln -sf "$(which make)" /usr/bin/gmake && cd /mvdsv && ./build_cmake.sh ${{ matrix.target }} && chown -R '$(id -u ${USER})':'$(id -g ${USER})' /mvdsv/build/${{ matrix.target }}||exit 3'
else
./build_cmake.sh ${{ matrix.target }}
fi
if ${{ matrix.os == 'linux' }}; then
docker run --platform linux/${{ matrix.arch }} --net=host --rm --device /dev/fuse -v $PWD:/mvdsv -w /mvdsv ${{ matrix.build-image }} bash -c -e '
set -e
apt-get -qq update
apt-get -qq --no-install-recommends install cmake build-essential libcurl4-openssl-dev ninja-build
./build_cmake.sh ${{ matrix.target }}
chown -R '$(id -u ${USER})':'$(id -g ${USER})' build/${{ matrix.target }} || exit 3
'
else
./build_cmake.sh ${{ matrix.target }}
fi
- name: Create checksum
run: |
md5sum build/${{ matrix.target }}/mvdsv${{ matrix.ext }} > build/${{ matrix.target }}/mvdsv.md5
Expand Down
39 changes: 19 additions & 20 deletions .github/workflows/build-and-deploy-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:
ext: ""
- target: linux-i686
os: linux
arch: i686
arch: i386
base-image: ubuntu-latest
build-image: i386/debian:stable
ext: ""
- target: linux-armhf
os: linux
arch: armhf
arch: arm/v7
base-image: ubuntu-latest
build-image: arm32v7/debian:stable
ext: ""
- target: linux-aarch64
os: linux
arch: aarch64
arch: arm64
base-image: ubuntu-latest
build-image: arm64v8/debian:stable
ext: ""
Expand All @@ -48,27 +48,26 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: matrix.os == 'linux'
- name: Prepare Build Environemnt
shell: bash
run: |
if ${{ matrix.os == 'linux' }}; then
sudo apt-get update
sudo apt-get -y install qemu-system-arm qemu-user-static
else
sudo apt-get update
sudo apt-get -y install build-essential cmake gcc-i686-linux-gnu
sudo apt-get -y install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
sudo apt-get -y install gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
fi
run: sudo apt-get update -qq && sudo apt-get -qq --no-install-recommends install build-essential cmake gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
if: matrix.os == 'windows'
- name: Build
shell: bash
run: |
if ${{ matrix.os == 'linux' }}; then
docker pull ${{ matrix.build-image }}
docker run --net=host --rm --device /dev/fuse -v $PWD:/mvdsv ${{ matrix.build-image }} bash -c -e 'export ARCH=$(dpkg --print-architecture);export DEBIAN_FRONTEND=noninteractive;mkdir -p /etc/apt/apt.conf.d;echo "APT::Install-Recommends "0"; APT::AutoRemove::RecommendsImportant "false";" >> /etc/apt/apt.conf.d/01lean && apt-get -qqy update && apt-get -qqy dist-upgrade && apt-get -qqy install cmake build-essential libcurl4-openssl-dev && ln -sf "$(which make)" /usr/bin/gmake && cd /mvdsv && ./build_cmake.sh ${{ matrix.target }} && chown -R '$(id -u ${USER})':'$(id -g ${USER})' /mvdsv/build/${{ matrix.target }}||exit 3'
else
./build_cmake.sh ${{ matrix.target }}
fi
if ${{ matrix.os == 'linux' }}; then
docker run --platform linux/${{ matrix.arch }} --net=host --rm --device /dev/fuse -v $PWD:/mvdsv -w /mvdsv ${{ matrix.build-image }} bash -c -e '
set -e
apt-get -qq update
apt-get -qq --no-install-recommends install cmake build-essential libcurl4-openssl-dev ninja-build
./build_cmake.sh ${{ matrix.target }}
chown -R '$(id -u ${USER})':'$(id -g ${USER})' build/${{ matrix.target }} || exit 3
'
else
./build_cmake.sh ${{ matrix.target }}
fi
- name: Create checksum
run: |
md5sum build/${{ matrix.target }}/mvdsv${{ matrix.ext }} > build/${{ matrix.target }}/mvdsv.md5
Expand Down
35 changes: 18 additions & 17 deletions .github/workflows/build-targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: build targets
on: [push,pull_request]
jobs:
build:
if: github.repository == 'QW-Group/mvdsv'
runs-on: ${{ matrix.base-image }}
strategy:
fail-fast: false
Expand All @@ -17,19 +16,19 @@ jobs:
ext: ""
- target: linux-i686
os: linux
arch: i686
arch: i386
base-image: ubuntu-latest
build-image: i386/debian:stable
ext: ""
- target: linux-armhf
os: linux
arch: armhf
arch: arm/v7
base-image: ubuntu-latest
build-image: arm32v7/debian:stable
ext: ""
- target: linux-aarch64
os: linux
arch: aarch64
arch: arm64
base-image: ubuntu-latest
build-image: arm64v8/debian:stable
ext: ""
Expand All @@ -48,24 +47,26 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: matrix.os == 'linux'

- name: Prepare Build Environemnt
shell: bash
run: |
if ${{ matrix.os == 'linux' }}; then
sudo apt-get update
sudo apt-get -y install qemu-system-arm qemu-user-static
else
sudo apt-get update
sudo apt-get -y install build-essential cmake gcc-i686-linux-gnu
sudo apt-get -y install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
sudo apt-get -y install gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
fi
run: sudo apt-get update -qq && sudo apt-get -qq --no-install-recommends install build-essential cmake gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
if: matrix.os == 'windows'

- name: Build
shell: bash
run: |
if ${{ matrix.os == 'linux' }}; then
docker pull ${{ matrix.build-image }}
docker run --net=host --rm --device /dev/fuse -v $PWD:/mvdsv ${{ matrix.build-image }} bash -c -e 'export ARCH=$(dpkg --print-architecture);export DEBIAN_FRONTEND=noninteractive;mkdir -p /etc/apt/apt.conf.d;echo "APT::Install-Recommends "0"; APT::AutoRemove::RecommendsImportant "false";" >> /etc/apt/apt.conf.d/01lean && apt-get -qqy update && apt-get -qqy dist-upgrade && apt-get -qqy install cmake build-essential libcurl4-openssl-dev && ln -sf "$(which make)" /usr/bin/gmake && cd /mvdsv && ./build_cmake.sh ${{ matrix.target }} && chown -R '$(id -u ${USER})':'$(id -g ${USER})' /mvdsv/build/${{ matrix.target }}||exit 3'
docker run --platform linux/${{ matrix.arch }} --net=host --rm --device /dev/fuse -v $PWD:/mvdsv -w /mvdsv ${{ matrix.build-image }} bash -c -e '
set -e
apt-get -qq update
apt-get -qq --no-install-recommends install cmake build-essential libcurl4-openssl-dev ninja-build
./build_cmake.sh ${{ matrix.target }}
chown -R '$(id -u ${USER})':'$(id -g ${USER})' build/${{ matrix.target }} || exit 3
'
else
./build_cmake.sh ${{ matrix.target }}
fi