Skip to content

Commit

Permalink
Merge pull request #76 from Jonak-Adipta-Kalita/main
Browse files Browse the repository at this point in the history
idk what am gonna work on, just make the windows runner work ig?
  • Loading branch information
Jonak-Adipta-Kalita authored Sep 2, 2024
2 parents 91a15cf + d67dc6c commit cbd5a4c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 24 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
output: flomo/session_id.dylib
compile_command: clang -fPIC -shared -o
- os: windows-latest
compile_command: gcc -fPIC -shared -o
output: flomo/session_id.dll

steps:
Expand All @@ -33,32 +34,15 @@ jobs:
uses: egor-tensin/setup-gcc@v1
if: runner.os == 'Linux'

- name: Set up MSVC
uses: microsoft/[email protected]
- name: Set up MinGW
uses: egor-tensin/[email protected]
with:
platform: x64
if: runner.os == 'Windows'

- name: Compile (Unix)
if: runner.os != 'Windows'
- name: Compile
run: ${{ matrix.compile_command }} ${{ matrix.output }} flomo/session_id.c

- name: Compile (Windows)
if: runner.os == 'Windows'
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsPath = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
$vcvarsall = Join-Path $vsPath "VC\Auxiliary\Build\vcvarsall.bat"
$batchFile = New-TemporaryFile
$batchFile = Rename-Item -Path $batchFile -NewName "$($batchFile.BaseName).bat" -PassThru
$batchContent = @"
call "$vcvarsall" x64
cl.exe /LD /Fe$($env:GITHUB_WORKSPACE)\${{ matrix.output }} $($env:GITHUB_WORKSPACE)\flomo\session_id.c
"@
Set-Content -Path $batchFile -Value $batchContent
Start-Process -FilePath $batchFile -Wait -NoNewWindow
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ __pycache__/

# C extensions
*.so
*.dll
*.dylib

# Distribution / packaging
.Python
Expand Down
1 change: 1 addition & 0 deletions flomo/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import flomo.tracker as tracker
import flomo.ui as ui

# TODO: Use Pomodoro when starting and change to Flomodoro after 1 Session

class OrderCommands(click.Group):
def list_commands(self, ctx: click.Context) -> list[str]:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import find_packages, setup

AUTHOR = "Dark Circles"
VERSION = "1.0.1"
VERSION = "1.0.2"
SHORT_DESCRIPTION = "A Flowmodoro Timer CLI for producitivity enthusiasts."
AUTHOR_EMAIL = (
"<[email protected]>, <[email protected]>, <[email protected]>"
Expand All @@ -28,7 +28,7 @@
"Programming Language :: Python :: 3",
]

with open("docs/README.md", "r", encoding='utf-8') as fh:
with open("docs/README.md", "r", encoding="utf-8") as fh:
LONG_DESCRIPTION = fh.read()

if __name__ == "__main__":
Expand Down

0 comments on commit cbd5a4c

Please sign in to comment.