Skip to content

Commit

Permalink
Merge branch 'develop' into rearange-play
Browse files Browse the repository at this point in the history
and fix conflicts
  • Loading branch information
Gatsik committed Jun 8, 2024
2 parents 46e282d + 4b0417d commit c534b8e
Show file tree
Hide file tree
Showing 378 changed files with 28,275 additions and 14,232 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Checks

on:
push:
pull_request:
branches: [ develop ]

jobs:
checks:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test with pytest
run: |
python runtests.py -vv --full-trace
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
description: 'Release Version'
required: true

jobs:
release:
environment: deploy
runs-on: windows-latest
env:
UID_VERSION: v4.0.6
ICE_ADAPTER_VERSION: v3.3.7
BUILD_VERSION: ${{ github.event.inputs.version }}

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Download ICE adapter and UID calculator
run: |
mkdir build_setup\ice-adapter
Invoke-WebRequest -Uri "https://github.com/FAForever/uid/releases/download/$($env:UID_VERSION)/faf-uid.exe" -OutFile ".\\build_setup\\faf-uid.exe"
Invoke-WebRequest -Uri "https://content.faforever.com/build/jre/windows-amd64-21.0.1.tar.gz" -OutFile ".\\windows-amd64-15.0.1.tar.gz"
7z x windows-amd64-15.0.1.tar.gz
7z x windows-amd64-15.0.1.tar -obuild_setup/ice-adapter/jre
Invoke-WebRequest -Uri "https://github.com/FAForever/java-ice-adapter/releases/download/$($env:ICE_ADAPTER_VERSION)/faf-ice-adapter-$($env:ICE_ADAPTER_VERSION)-win.jar" -OutFile ".\\build_setup\\ice-adapter\\faf-ice-adapter.jar"
- name: Test with pytest
run: |
python runtests.py -vv --full-trace
- name: Build application
run: |
python setup.py bdist_msi
- name: Get Artifact Paths
id: artifact_paths
run: |
function getMsiPath {
$files = Get-ChildItem *.msi -Recurse | Select -First 1
(Get-Item $files).FullName
}
$WINDOWS_MSI = getMsiPath
Write-Host "MSI path: $WINDOWS_MSI"
$WINDOWS_MSI_NAME = (Get-Item $WINDOWS_MSI).Name
Write-Host "MSI name: $WINDOWS_MSI_NAME"
echo "WINDOWS_MSI=$WINDOWS_MSI" >> "$env:GITHUB_ENV"
echo "WINDOWS_MSI_NAME=$WINDOWS_MSI_NAME" >> "$env:GITHUB_ENV"
- name: Calculate checksum
id: checksum
run: |
Write-Host MSI path is: $env:WINDOWS_MSI
$MSI_SUM = $(Get-FileHash $env:WINDOWS_MSI).hash
Write-Host $MSI_SUM
echo "MSI_SUM=$MSI_SUM" >> "$env:GITHUB_ENV"
- name: Create draft release
id: create_release
uses: ncipollo/[email protected]
with:
commit: ${{ github.sha }}
tag: ${{ github.event.inputs.version }}
body: "SHA256: ${{ env.MSI_SUM }}"
draft: true
prerelease: true
artifacts: ${{ env.WINDOWS_MSI }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
*.pydev*
*.vcproj
.idea/
lib/faf-uid
lib/faf-uid.exe
lib/
natives/
build/
build_setup/
dist/
Thumbs.db
.DS_Store
Expand Down
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
1 change: 0 additions & 1 deletion .travis.sh

This file was deleted.

28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

27 changes: 0 additions & 27 deletions Vagrantfile

This file was deleted.

71 changes: 0 additions & 71 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit c534b8e

Please sign in to comment.