Skip to content

Commit

Permalink
Merge pull request #156 from benreid24/fix-builds
Browse files Browse the repository at this point in the history
Fix Linux & Macos builds + update dependencies
  • Loading branch information
benreid24 authored Jul 29, 2024
2 parents b41c0a9 + a449565 commit 78f47e1
Show file tree
Hide file tree
Showing 16 changed files with 12,277 additions and 11,833 deletions.
61 changes: 50 additions & 11 deletions .github/workflows/backend_verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,65 @@ name: Backend Build Verify
on: [pull_request]

jobs:
build:

build-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10.11"
- name: Verify build
run: |
cd backend
python -m pip install --upgrade pip setuptools wheel virtualenv
virtualenv venv
venv/Scripts/activate.ps1
pip install -r requirements.txt
python compile.py build
- name: Check Output
run: |
cd backend
if (-Not (Test-Path ./build/Stellaru.exe -PathType Leaf)) { exit 1 }
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10.11"
- name: Verify build
run: |
cd backend
python -m pip install --upgrade pip setuptools wheel virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python compile.py build
- name: Check Output
run: |
cd backend
test -f "./build/Stellaru" || exit 1
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10.11"
- name: Verify build
run: |
cd backend
python -m pip install --upgrade pip
python -m pip install --upgrade pip setuptools wheel virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python compile.py build
- name: Check Output
run: |
cd backend
if (-Not (Test-Path .\build\Stellaru.exe -PathType Leaf)) { exit 1 }
test -f "./build/Stellaru" || exit 1
60 changes: 30 additions & 30 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@ jobs:
windows_build:
name: Windows Build
runs-on: windows-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10.11"
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '12.x'
node-version: '18.x'
- name: Build Frontend
run: |
cd frontend
Expand All @@ -30,7 +27,9 @@ jobs:
- name: Build Backend
run: |
cd backend
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel virtualenv
virtualenv venv
venv/Scripts/activate.ps1
pip install -r requirements.txt
python compile.py build
- name: Package Project
Expand All @@ -48,6 +47,7 @@ jobs:
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI: false
with:
upload_url: ${{ github.event.client_payload.release_url }}
asset_path: ./Windows.zip
Expand All @@ -57,20 +57,17 @@ jobs:
osx_build:
name: OS X Build
runs-on: macos-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10.11"
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '12.x'
node-version: '18.x'
- name: Build Frontend
run: |
cd frontend
Expand All @@ -79,7 +76,9 @@ jobs:
- name: Build Backend
run: |
cd backend
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python compile.py build
- name: Package Project
Expand All @@ -102,6 +101,7 @@ jobs:
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI: false
with:
upload_url: ${{ github.event.client_payload.release_url }}
asset_path: ./MacOS.zip
Expand All @@ -111,20 +111,17 @@ jobs:
linux_build:
name: Linux Build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10.11"
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '12.x'
node-version: '18.x'
- name: Build Frontend
run: |
cd frontend
Expand All @@ -133,7 +130,9 @@ jobs:
- name: Build Backend
run: |
cd backend
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python compile.py build
- name: Package Project
Expand All @@ -151,6 +150,7 @@ jobs:
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI: false
with:
upload_url: ${{ github.event.client_payload.release_url }}
asset_path: ./Linux.zip
Expand Down
40 changes: 34 additions & 6 deletions .github/workflows/frontend_verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,44 @@ name: Frontend Build Verify
on: [pull_request]

jobs:
build:
build-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '12.x'
node-version: '18.x'
- run: cd frontend && npm install
- run: cd frontend && npm run build --if-present
env:
CI: true
env:
CI: false

build-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- run: cd frontend && npm install
- run: cd frontend && npm run build --if-present
env:
CI: false

build-macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- run: cd frontend && npm install
- run: cd frontend && npm run build --if-present
env:
CI: false
85 changes: 42 additions & 43 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
altgraph==0.17
asgiref==3.4.1
attrs==19.3.0
autobahn==22.5.1
Automat==20.2.0
certifi==2020.6.20
cffi==1.15.0
channels==3.0.4
chardet==3.0.4
charset-normalizer==2.0.7
constantly==15.1.0
cryptography==37.0.2
cx-Freeze==6.11.1
cx-Logging==3.0
daphne==3.0.2
Django==3.2.12
future==0.18.2
altgraph==0.17.4
asgiref==3.8.1
attrs==23.2.0
autobahn==23.6.2
Automat==22.10.0
certifi==2024.7.4
cffi==1.16.0
channels==4.1.0
chardet==5.2.0
charset-normalizer==3.3.2
constantly==23.10.4
cryptography==43.0.0
cx_Freeze==7.2.0
daphne==4.1.2
Django==4.2.14
future==1.0.0
hyperlink==21.0.0
idna==2.10
importlib-metadata==4.11.4
incremental==21.3.0
lief==0.12.1
packaging==21.3
pefile==2019.4.18
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.20
PyHamcrest==2.0.2
pyOpenSSL==22.0.0
pyparsing==3.0.9
pytz==2020.1
pywin32-ctypes==0.2.0
requests==2.26.0
service-identity==21.1.0
six==1.15.0
sqlparse==0.3.1
Twisted==22.4.0
twisted-iocpsupport==1.0.2
txaio==22.2.1
typing_extensions==4.2.0
urllib3==1.26.7
xdg==4.0.1
zipp==3.8.0
zope.interface==5.1.0
idna==3.7
importlib_metadata==8.2.0
incremental==24.7.1
lief==0.14.1
packaging==24.1
pefile==2023.2.7
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
PyHamcrest==2.1.0
pyOpenSSL==24.2.1
pyparsing==3.1.2
pytz==2024.1
pywin32-ctypes==0.2.2
requests==2.32.3
service-identity==24.1.0
six==1.16.0
sqlparse==0.5.1
tomli==2.0.1
txaio==23.1.1
typing_extensions==4.12.2
tzdata==2024.1
urllib3==2.2.2
xdg==6.0.0
zipp==3.19.2
zope.interface==6.4.post2
17 changes: 0 additions & 17 deletions backend/stellaru/asgi.py

This file was deleted.

2 changes: 2 additions & 0 deletions backend/stellaru/routing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.urls import path
from channels.routing import ProtocolTypeRouter,URLRouter
from channels.sessions import SessionMiddlewareStack
from django.core.asgi import get_asgi_application

from stellaru_api.subscription import Subscription

Expand All @@ -10,4 +11,5 @@
path('api/subscribe', Subscription.as_asgi())
])
),
"http": get_asgi_application(),
})
1 change: 1 addition & 0 deletions backend/stellaru/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
# Application definition

INSTALLED_APPS = [
'daphne',
'channels',
'stellaru_api',
'django.contrib.admin',
Expand Down
Loading

0 comments on commit 78f47e1

Please sign in to comment.