Skip to content

Commit

Permalink
Work on deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
perara committed Oct 17, 2024
1 parent 575f24a commit bb63853
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and publish to PyPI

on:
push:
tags:
- 'v*'

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.12.3

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: cp36-* cp37-* pp*
CIBW_BEFORE_BUILD: pip install -r requirements.txt

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion jsp/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void runExperiments(int n_threads, bool use_gui) {
int main(int argc, char* argv[]) {
// Updated argv with proper types
//const char* args[] = {"program_name", "qlearning", "--no-gui"};
const char* args[] = {"program_name", "ppo", "--no-gui"};
const char* args[] = {"program_name", "qlearning", "--no-gui"};
argc = 3; // Simulate command-line arguments
argv = const_cast<char**>(args); // Cast away constness

Expand Down

0 comments on commit bb63853

Please sign in to comment.