From 3baf48a21aeb0714ce31d5fce86ac1796739a043 Mon Sep 17 00:00:00 2001 From: New Future Date: Mon, 2 Jun 2025 03:12:33 +0800 Subject: [PATCH] build Linux version in centos docker fix glibc (#464) * build linux version in centos docker * fix build * Nuitka/Nuitka-Action@v1.3 --- .github/workflows/build.yml | 42 ++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2dd4c9ffc..d1bd91133 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,7 +163,7 @@ jobs: - run: python3 ./run.py -h - name: Build Executable - uses: Nuitka/Nuitka-Action@main + uses: Nuitka/Nuitka-Action@v1.3 with: nuitka-version: main script-name: run.py @@ -211,6 +211,46 @@ jobs: dist/*.app dist/ddns + nuitka-linux: + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, ubuntu-24.04-arm ] + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + + # Prepare build version and cert + - name: Replace build version + run: sed -i.tmp -e "s#\${BUILD_VERSION}#${{ github.ref_name }}#" -e "s/\${BUILD_DATE}/$(date --iso-8601=seconds)/" run.py && rm run.py.tmp + shell: bash + + # https://github.com/Nuitka/Nuitka/issues/2723#issuecomment-1960831891 + - name: Run the build process with CentOS Docker + uses: addnab/docker-run-action@v3 + with: + image: docker.io/centos:8 + options: -v ${{ github.workspace }}:/DDNS + run: | + cd /etc/yum.repos.d/ && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* + dnf install -y epel-release \ + && dnf repolist \ + && dnf install -y gcc strace patchelf ccache gdb make python3-devel python3-zstandard python3-ordered-set + python3 -m pip install nuitka + cd /DDNS && python3 .build/remove_python2.py && .build/nuitka.cmd + + - run: ./dist/ddns || test -e config.json + - run: ./dist/ddns -h + + # Upload build result + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: ddns-linux-${{ contains(matrix.os, 'arm' ) && 'arm64' || 'x64' }} + if-no-files-found: error + path: dist/ddns + docker: if: github.event_name == 'pull_request' needs: [ python ]