Browse Source

first try with github actions

Thomas Buck 3 years ago
parent
commit
3f8a231a46

+ 21
- 0
.github/workflows/buildmac.yml View File

@@ -0,0 +1,21 @@
1
+name: Build Windows
2
+
3
+on: [push]
4
+
5
+jobs:
6
+  build:
7
+    runs-on: macos-latest
8
+    steps:
9
+    - uses: actions/checkout@v2
10
+    - name: Set up Python 3.9
11
+      uses: actions/setup-python@v2
12
+      with:
13
+        python-version: 3.9
14
+    - name: Install dependencies
15
+      run: |
16
+        python -m pip install --upgrade pip
17
+        pip install pylint
18
+        pip install py2exe
19
+    - name: Run Mac build
20
+      run: |
21
+        ./build_mac.sh

+ 21
- 0
.github/workflows/buildwindows.yml View File

@@ -0,0 +1,21 @@
1
+name: Build Windows
2
+
3
+on: [push]
4
+
5
+jobs:
6
+  build:
7
+    runs-on: windows-latest
8
+    steps:
9
+    - uses: actions/checkout@v2
10
+    - name: Set up Python 3.9
11
+      uses: actions/setup-python@v2
12
+      with:
13
+        python-version: 3.9
14
+    - name: Install dependencies
15
+      run: |
16
+        python -m pip install --upgrade pip
17
+        pip install pylint
18
+        pip install py2exe
19
+    - name: Run Windows build
20
+      run: |
21
+        build_win.bat

+ 20
- 0
.github/workflows/pylint.yml View File

@@ -0,0 +1,20 @@
1
+name: Pylint
2
+
3
+on: [push]
4
+
5
+jobs:
6
+  build:
7
+    runs-on: ubuntu-latest
8
+    steps:
9
+    - uses: actions/checkout@v2
10
+    - name: Set up Python 3.9
11
+      uses: actions/setup-python@v2
12
+      with:
13
+        python-version: 3.9
14
+    - name: Install dependencies
15
+      run: |
16
+        python -m pip install --upgrade pip
17
+        pip install pylint
18
+    - name: Analysing the code with pylint
19
+      run: |
20
+        pylint `ls -R|grep .py$|xargs`

+ 11
- 0
build_win.bat View File

@@ -0,0 +1,11 @@
1
+#!/bin/sh
2
+
3
+del build/win
4
+mkdir build/win
5
+
6
+cp src/* build/win/
7
+cp data/* build/win/
8
+cp dist/setup_win.py build/win/
9
+
10
+cd build/win
11
+python setup_win.py py2exe

+ 1
- 1
data/de.xythobuz.octotray.desktop View File

@@ -1,6 +1,6 @@
1 1
 [Desktop Entry]
2 2
 Type=Application
3
-Version=1.0
3
+Version=0.3
4 4
 Name=OctoTray
5 5
 Comment=Control OctoPrint instances from system tray
6 6
 Path=/usr/bin

+ 0
- 7
dist/setup_mac.py View File

@@ -1,13 +1,6 @@
1 1
 #!/usr/bin/env python
2 2
 # -*- coding: utf-8 -*-
3 3
 
4
-"""
5
-This is a setup.py script generated by py2applet
6
-
7
-Usage:
8
-    python setup.py py2app
9
-"""
10
-
11 4
 from setuptools import setup
12 5
 
13 6
 APP = ['octotray.py']

+ 7
- 0
dist/setup_win.py View File

@@ -0,0 +1,7 @@
1
+#!/usr/bin/env python
2
+# -*- coding: utf-8 -*-
3
+
4
+import py2exe
5
+from distutils.core import setup
6
+
7
+setup(windows=[{"script": "octotray.py"}])

Loading…
Cancel
Save