Skip to content

Commit 2136125

Browse files
authored
run docker
1 parent 29b36e9 commit 2136125

File tree

1 file changed

+8
-49
lines changed

1 file changed

+8
-49
lines changed

.github/workflows/nuitka.yml

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -16,65 +16,24 @@ jobs:
1616
nuitka:
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 30
19-
container: docker.io/centos:7
2019
steps:
21-
- uses: actions/checkout@v2
22-
- name: Set up Python 3.x
23-
uses: actions/setup-python@v5
24-
with:
25-
python-version: 3.x
20+
- uses: actions/checkout@v4
2621

27-
- name: remove python2 code
28-
run: python3 .build/remove_python2.py
2922

3023
# Prepare build version and cert
3124
- name: Replace build version
3225
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
3326
shell: bash
3427

35-
- name: Set up on Linux
36-
if: runner.os == 'Linux'
37-
run: |
38-
sudo yum update && sudo yum install -y patchelf
3928

40-
- name: Set up on macOS
41-
if: runner.os == 'macOS'
42-
run: python3 -m pip install imageio
43-
44-
- run: python3 ./run.py -h
29+
- name: run centos7
30+
run: |
31+
docker run -itd -v ${pwd}:/tmp/DDNS --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
32+
yum-config-manager --add-repo http://download.opensuse.org/repositories/home:/kayhayen/CentOS_7/home:kayhayen.repo
33+
sudo yum -y install swig gcc gcc-c++ kernel-devel nuitka python3
34+
python3 .build/remove_python2.py
35+
.build/nuitka.cmd
4536
46-
- name: Build Executable
47-
uses: Nuitka/Nuitka-Action@main
48-
with:
49-
nuitka-version: main
50-
script-name: run.py
51-
mode: onefile
52-
output-dir: dist
53-
output-file: ddns
54-
no-deployment-flag: self-execution
55-
include-module: |
56-
dns.dnspod
57-
dns.alidns
58-
dns.dnspod_com
59-
dns.dnscom
60-
dns.cloudflare
61-
dns.he
62-
dns.huaweidns
63-
dns.callback
64-
file-description: "DDNS Client 更新域名解析本机IP"
65-
product-name: DDNS
66-
company-name: "New Future"
67-
copyright: "https://ddns.newfuture.cc"
68-
assume-yes-for-downloads: true
69-
lto: auto
70-
python-flag: no_site,no_asserts,no_docstrings,isolated,static_hashes
71-
nofollow-import-to: tkinter,unittest,pydoc,doctest,distutils,setuptools,lib2to3,test,idlelib,lzma
72-
onefile-tempdir-spec: "{CACHE_DIR}/{PRODUCT}_{VERSION}"
73-
windows-icon-from-ico: ${{ runner.os == 'Windows' && 'favicon.ico' || '' }}
74-
linux-icon: ${{ runner.os == 'Linux' && '.build/ddns.svg' || '' }}
75-
static-libpython: ${{ runner.os == 'Linux' && 'yes' || 'auto' }}
76-
macos-app-name: ${{ runner.os == 'macOS' && 'DDNS' || '' }}
77-
macos-app-icon: ${{ runner.os == 'macOS' && '.build/ddns.svg' || '' }}
7837
7938
8039
- run: ./dist/ddns || test -e config.json

0 commit comments

Comments
 (0)