Skip to content

Commit d71e7d7

Browse files
committed
Added everything from goopylib v2.
2 parents 942db9c + 390ec87 commit d71e7d7

File tree

2,794 files changed

+445923
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,794 files changed

+445923
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This workflow builds a shared library for goopylib using CMake & Python wheels
2+
3+
name: "Build Binary"
4+
run-name: ${{ github.actor }} building goopylib
5+
6+
on:
7+
workflow_dispatch:
8+
9+
push:
10+
paths:
11+
- src/**
12+
- CMakeLists.txt
13+
- .github/workflows/build-goopylib.yml
14+
15+
pull_request:
16+
paths:
17+
- src/**
18+
- CMakeLists.txt
19+
- .github/workflows/build-goopylib.yml
20+
21+
env:
22+
BUILD_TYPE: Release
23+
24+
jobs:
25+
build-cmake:
26+
name: Build with CMake on ${{ matrix.os }}
27+
runs-on: ${{ matrix.os }}
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
os: [ windows-latest, macos-latest, ubuntu-latest ]
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
submodules: 'recursive'
38+
39+
- if: runner.os == 'Linux'
40+
run: sudo apt-get install xorg-dev libgl1-mesa-dev
41+
42+
- name: Configure CMake
43+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
44+
45+
- name: Build goopylib
46+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 8 --target goopylib
47+
48+
- name: Upload Binaries
49+
uses: test-room-7/action-update-file@v1
50+
with:
51+
file-path: binaries/**/*.*
52+
branch: ${{ github.ref_name }}
53+
allow-dot: true
54+
commit-msg: Uploaded auto-built binaries
55+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-wheels.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# This workflow builds Python wheels & a source distribution for goopylib
2+
3+
name: "Build Wheels"
4+
run-name: ${{ github.actor }} building wheels
5+
6+
on:
7+
workflow_dispatch:
8+
9+
workflow_run:
10+
workflows: [ Build Binary ]
11+
types:
12+
- completed
13+
14+
push:
15+
paths:
16+
- setup.py
17+
- tools/setup_extensions.py
18+
- pyproject.toml
19+
- MANIFEST.in
20+
- .github/workflows/build-wheels.yml
21+
22+
pull_request:
23+
paths:
24+
- setup.py
25+
- tools/setup_extensions.py
26+
- pyproject.toml
27+
- MANIFEST.in
28+
- .github/workflows/build-wheels.yml
29+
30+
env:
31+
BUILD_TYPE: Release
32+
33+
jobs:
34+
build-source-distribution:
35+
name: Build source distribution
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- uses: actions/checkout@v4
40+
with:
41+
submodules: 'recursive'
42+
43+
- name: Install dependencies
44+
run: python -m pip install build
45+
46+
- name: Create source distribution
47+
run: python -m build --sdist
48+
49+
- uses: actions/upload-artifact@v4
50+
with:
51+
name: goopylib-source-distribution
52+
path: dist/
53+
54+
build-wheels:
55+
name: Build ${{ matrix.os }} Python wheels
56+
runs-on: ${{ matrix.os }}
57+
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
os: [ windows-latest, macos-latest ]
62+
python: [ "cp38-", "cp39-", "cp310-", "cp311-" ]
63+
64+
steps:
65+
- uses: actions/checkout@v4
66+
with:
67+
submodules: 'recursive'
68+
69+
- name: Build Python wheels
70+
env:
71+
CIBW_BUILD: ${{ matrix.python }}*
72+
uses: pypa/cibuildwheel@v2.16.5
73+
74+
- uses: actions/upload-artifact@v4
75+
with:
76+
name: goopylib-${{ matrix.python }}${{ matrix.os }}-wheels
77+
path: wheelhouse/
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow analyzes the Python code in the repository for vulnerabilities
2+
3+
name: "CodeQL Python"
4+
5+
on:
6+
workflow_dispatch:
7+
8+
push:
9+
paths:
10+
- goopylib/**
11+
- .github/workflows/codeql-python.yml
12+
13+
pull_request:
14+
paths:
15+
- goopylib/**
16+
- .github/workflows/codeql-python.yml
17+
18+
jobs:
19+
analyze:
20+
name: Analyze
21+
runs-on: ubuntu-latest
22+
permissions:
23+
actions: read
24+
contents: read
25+
security-events: write
26+
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
language: [ "python" ]
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
# Initializes the CodeQL tools for scanning.
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@v2
39+
with:
40+
languages: ${{ matrix.language }}
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v2
44+
with:
45+
category: "/language:${{matrix.language}}"

.github/workflows/google-test.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This workflow runs goopylib's C++ GTests
2+
3+
name: "Google Tests"
4+
run-name: ${{ github.actor }} running C++ GTests
5+
6+
on:
7+
workflow_dispatch:
8+
9+
workflow_run:
10+
workflows: [ Build Binary ]
11+
types:
12+
- completed
13+
14+
push:
15+
paths:
16+
- .github/workflows/google-test.yml
17+
- tests/**/CMakeLists.txt
18+
19+
pull_request:
20+
paths:
21+
- .github/workflows/google-test.yml
22+
- tests/**/CMakeLists.txt
23+
24+
env:
25+
BUILD_TYPE: Release
26+
27+
jobs:
28+
build-cmake:
29+
name: Build with CMake on ${{ matrix.os }}
30+
runs-on: ${{ matrix.os }}
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
os: [ ubuntu-bionic ]
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
with:
40+
submodules: 'recursive'
41+
42+
- uses: openrndr/setup-opengl@v1.1
43+
44+
- name: Setup OpenGL
45+
run: xvfb-run glxinfo
46+
47+
- name: Configure CMake
48+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
49+
50+
- name: Build tests
51+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 8 --target core_tests
52+
53+
- name: Run tests
54+
run: |
55+
ls
56+
tests/core_tests.exe --gtest_filter=* --gtest_color=no

.github/workflows/pylint.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Pylint
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
paths:
8+
- "**.py"
9+
- .pylintrc
10+
- .github/workflows/pylint.yml
11+
12+
pull_request:
13+
paths:
14+
- "**.py"
15+
- .pylintrc
16+
- .github/workflows/pylint.yml
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
python-version: ["3.8", "3.9", "3.10", "3.11"]
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v3
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install pylint
38+
pip install -r requirements.txt
39+
40+
- name: Analysing the code with pylint
41+
run: |
42+
pylint $(git ls-files 'goopylib/*.py')

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Ignore all
2+
*
3+
4+
# Unignore all with extensions
5+
!*.*
6+
7+
# Unignore all dirs
8+
!*/
9+
10+
### Above combination will ignore all files without extension ###
11+
12+
# General things to ignore
13+
*.py[cod]
14+
__pycache__/
15+
16+
*.pdb
17+
*.log
18+
*.egg
19+
*.so
20+
21+
cmake-*/
22+
Release/
23+
**/debug/*
24+
**/libglfw3.a
25+
**/glfw3.a
26+
**/glfw3.lib
27+
28+
build/
29+
dist/
30+
wheelhouse/
31+
*.egg-info/
32+
docs/_build/
33+
34+
vs/*
35+
.idea/*
36+
37+
main.py
38+
main.cpp

.gitmodules

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[submodule "vendor/spdlog"]
2+
path = vendor/spdlog
3+
url = https://github.com/gabime/spdlog
4+
[submodule "vendor/GLFW"]
5+
path = vendor/GLFW
6+
url = https://github.com/glfw/glfw
7+
[submodule "vendor/glm"]
8+
path = vendor/glm
9+
url = https://github.com/icaven/glm
10+
[submodule "examples/SolarSystem"]
11+
path = examples/SolarSystem
12+
url = https://github.com/BhavyeMathur/goopylib-solar-system-simulation
13+
[submodule "examples/ConwaysGameOfLife"]
14+
path = examples/ConwaysGameOfLife
15+
url = https://github.com/BhavyeMathur/goopylib-conways-game-of-life
16+
[submodule "vendor/googletest"]
17+
path = vendor/googletest
18+
url = https://github.com/google/googletest
19+
[submodule "examples/BrickBreaker"]
20+
path = examples/BrickBreaker
21+
url = https://github.com/BhavyeMathur/goopylib-brick-breaker
22+
[submodule "vendor/pybind11"]
23+
path = vendor/pybind11
24+
url = https://github.com/pybind/pybind11
25+
branch = stable
26+
[submodule "vendor/map-macro"]
27+
path = vendor/map-macro
28+
url = https://github.com/Erlkoenig90/map-macro

.pylintrc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[FORMAT]
2+
max-line-length=120
3+
4+
[MESSAGES CONTROL]
5+
disable=
6+
pointless-string-statement,
7+
protected-access,
8+
9+
too-many-lines,
10+
too-many-public-methods,
11+
too-few-public-methods,
12+
too-many-branches,
13+
too-many-arguments,
14+
too-many-instance-attributes,
15+
too-many-locals,
16+
too-many-statements,
17+
18+
no-else-return,
19+
c-extension-no-member,
20+
unnecessary-lambda-assignment,
21+
global-statement,
22+
duplicate-code,
23+
wildcard-import,
24+
fixme,
25+
bad-option-value
26+
27+
[BASIC]
28+
good-names=

0 commit comments

Comments
 (0)