diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ccefa53b..f9cbd1e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,10 +10,10 @@ jobs: with: submodules: true - - name: Set up Python 3.9 + - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: "3.10" - name: Install environment run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 488c043d..819f05f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,107 +2,104 @@ name: Release Pipeline on: push: - tags: [ '*' ] + tags: ["*"] jobs: - build: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - with: - submodules: true + - uses: actions/checkout@v2 + with: + submodules: true - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" - - name: Install environment - run: | - python -m venv ./venv + - name: Install environment + run: | + python -m venv ./venv - - name: Install dependencies - run: | - ./venv/scripts/activate - python -m pip install -r requirements.txt - # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead - Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force + - name: Install dependencies + run: | + ./venv/scripts/activate + python -m pip install -r requirements.txt + # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead + Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force - - name: Finalize version - run: | - New-Item -ItemType file resources\final + - name: Finalize version + run: | + New-Item -ItemType file resources\final - - name: mypy game - run: | - ./venv/scripts/activate - mypy game + - name: mypy game + run: | + ./venv/scripts/activate + mypy game - - name: mypy gen - run: | - ./venv/scripts/activate - mypy gen + - name: mypy gen + run: | + ./venv/scripts/activate + mypy gen - - name: Build binaries - run: | - ./venv/scripts/activate - $env:PYTHONPATH=".;./pydcs" - pyinstaller pyinstaller.spec + - name: Build binaries + run: | + ./venv/scripts/activate + $env:PYTHONPATH=".;./pydcs" + pyinstaller pyinstaller.spec - - name: Create Installer - env: - TAG_NAME: ${{ github.ref }} - run: | - Copy-Item .\changelog.md .\dist + - name: Create Installer + env: + TAG_NAME: ${{ github.ref }} + run: | + Copy-Item .\changelog.md .\dist - - uses: actions/upload-artifact@v2 - with: - name: dcs_liberation - path: dist/ + - uses: actions/upload-artifact@v2 + with: + name: dcs_liberation + path: dist/ release: - needs: [ build ] + needs: [build] runs-on: windows-latest steps: - - uses: actions/download-artifact@v2 - with: - name: dcs_liberation + - uses: actions/download-artifact@v2 + with: + name: dcs_liberation - - name: "Get Version" - id: version - env: - TAG_NAME: ${{ github.ref }} - run: | - Get-ChildItem -Recurse -Depth 1 - $version = ($env:TAG_NAME -split "/") | Select-Object -Last 1 - $prerelease = ("2.1.1-alpha3" -match '[^\.\d]').ToString().ToLower() - Write-Host $version - Write-Host $prerelease - Write-Output "::set-output name=number::$version" - Write-Output "::set-output name=prerelease::$prerelease" - $changelog = Get-Content .\changelog.md - $last_change = ($changelog | Select-String -Pattern "^#\s" | Select-Object -Skip 1 -First 1).LineNumber - 2 - ($changelog | Select-Object -First $last_change) -join "`n" | Out-File .\releasenotes.md - Compress-Archive -Path .\dcs_liberation -DestinationPath "dcs_liberation.$version.zip" -Compression Optimal - - - uses: actions/create-release@v1 - id: create_release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - body_path: releasenotes.md - draft: false - prerelease: ${{ steps.version.outputs.prerelease }} + - name: "Get Version" + id: version + env: + TAG_NAME: ${{ github.ref }} + run: | + Get-ChildItem -Recurse -Depth 1 + $version = ($env:TAG_NAME -split "/") | Select-Object -Last 1 + $prerelease = ("2.1.1-alpha3" -match '[^\.\d]').ToString().ToLower() + Write-Host $version + Write-Host $prerelease + Write-Output "::set-output name=number::$version" + Write-Output "::set-output name=prerelease::$prerelease" + $changelog = Get-Content .\changelog.md + $last_change = ($changelog | Select-String -Pattern "^#\s" | Select-Object -Skip 1 -First 1).LineNumber - 2 + ($changelog | Select-Object -First $last_change) -join "`n" | Out-File .\releasenotes.md + Compress-Archive -Path .\dcs_liberation -DestinationPath "dcs_liberation.$version.zip" -Compression Optimal + - uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body_path: releasenotes.md + draft: false + prerelease: ${{ steps.version.outputs.prerelease }} - - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dcs_liberation.${{ steps.version.outputs.number }}.zip - asset_name: dcs_liberation.${{ steps.version.outputs.number }}.zip - asset_content_type: application/zip - \ No newline at end of file + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./dcs_liberation.${{ steps.version.outputs.number }}.zip + asset_name: dcs_liberation.${{ steps.version.outputs.number }}.zip + asset_content_type: application/zip diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e4aaee13..081e3ea0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,31 +3,30 @@ name: Test on: [push, pull_request] jobs: - build: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - with: - submodules: true + - uses: actions/checkout@v2 + with: + submodules: true - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" - - name: Install environment - run: | - python -m venv ./venv + - name: Install environment + run: | + python -m venv ./venv - - name: Install dependencies - run: | - ./venv/scripts/activate - python -m pip install -r requirements.txt - # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead - Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force + - name: Install dependencies + run: | + ./venv/scripts/activate + python -m pip install -r requirements.txt + # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead + Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force - - name: run tests - run: | - ./venv/scripts/activate - pytest tests + - name: run tests + run: | + ./venv/scripts/activate + pytest tests diff --git a/requirements.txt b/requirements.txt index af8423ca..0fcaaeaf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -35,7 +35,7 @@ pytest==7.0.1 python-dateutil==2.8.2 pywin32-ctypes==0.2.0 PyYAML==6.0 -Shapely==1.8.0 +./wheels/Shapely-1.8.0-cp310-cp310-win_amd64.whl shiboken2==5.15.2.1 six==1.16.0 tabulate==0.8.9 diff --git a/wheels/README.md b/wheels/README.md new file mode 100644 index 00000000..3e3642b2 --- /dev/null +++ b/wheels/README.md @@ -0,0 +1,4 @@ +# Wheels + +This directory contains Windows wheels for packages that do not yet have wheels +on PyPI. Wheels are downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/. diff --git a/wheels/Shapely-1.8.0-cp310-cp310-win_amd64.whl b/wheels/Shapely-1.8.0-cp310-cp310-win_amd64.whl new file mode 100644 index 00000000..e0e92d74 Binary files /dev/null and b/wheels/Shapely-1.8.0-cp310-cp310-win_amd64.whl differ