Skip to content

Commit

Permalink
Merge branch 'master' into dev/sign-macos-travis
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Jun 11, 2021
2 parents 717144d + 4cd3a79 commit 7018a72
Show file tree
Hide file tree
Showing 33 changed files with 1,209 additions and 315 deletions.
41 changes: 16 additions & 25 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ environment:
# a later point release.
# See: http://www.appveyor.com/docs/installed-software#python

- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.x" # currently 3.6.6
PYTHON_ARCH: "32"

#- PYTHON: "C:\\Python35-x64"
# PYTHON_VERSION: "3.5.x" # currently 3.5.2
# PYTHON_ARCH: "64"
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"

install:
# Enable long paths
Expand Down Expand Up @@ -88,10 +84,6 @@ install:
- "%CMD_IN_ENV% python --version"
- "%CMD_IN_ENV% python -c \"import struct; print(struct.calcsize('P') * 8)\""

# Add the python3 executable
- "copy %PYTHON%\\python.exe %PYTHON%\\python3.exe"
- "%CMD_IN_ENV% python3 --version"

# Install node and npm
- ps: "./scripts/ci/install_node.ps1"
- "SET PATH=C:\\Program Files\\nodejs;%PATH%"
Expand All @@ -100,28 +92,26 @@ install:
# about it being out of date.
# Disabled for same reason as specified here:
# - https://github.com/ActivityWatch/aw-core/commit/e19ce9ea10912cf105859f97b8a7836dadd0fe58#diff-180360612c6b8c4ed830919bbb4dd459
- "%CMD_IN_ENV% python3 -m pip install --upgrade pip"
#- "%CMD_IN_ENV% python3 -m pip install --upgrade pip==9.0.3"
- "%CMD_IN_ENV% python -m pip install --upgrade pip"

# Install poetry and virtualenv
- "%CMD_IN_ENV% python -m pip install --upgrade poetry virtualenv"

# Install innosetup
- "choco install innosetup"

# Create build virtualenv
- "virtualenv --clear venv"
- "venv\\Scripts\\activate.bat"

# Testing dependencies
- "%CMD_IN_ENV% pip install --upgrade -r scripts\\dev-requirements.txt"
- "%CMD_IN_ENV% poetry install"

# Build dependencies
# Don't install as user, since that puts the pyrcc5 script in a user-specific place
- "%CMD_IN_ENV% pip install --upgrade pyqt5"
- "%CMD_IN_ENV% powershell scripts\\ci\\install_pyhook.ps1"

# Install the build dependencies of the project. If some dependencies contain
# compiled extensions and are not provided as pre-built wheel packages,
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
# - "%CMD_IN_ENV% pip install -r dev-requirements.txt"

# Lets start with seeing if aw-server will build
# TODO: Install stuff here
#- "cd aw-server"
#- "%CMD_IN_ENV% python setup.py install"

build_script:
# Build the compiled extension
- "%CMD_IN_ENV% make build"
Expand All @@ -141,6 +131,7 @@ after_test:
#- "%CMD_IN_ENV% python setup.py bdist_wininst"
#- "%CMD_IN_ENV% python setup.py bdist_msi"
#- ps: "ls dist"
- "%CMD_IN_ENV% poetry install" # reinstall PyInstaller, because somehow its altgraph dependency gets uninstalled by poetry when installing previous packages
- "%CMD_IN_ENV% make package"

artifacts:
Expand Down
10 changes: 5 additions & 5 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# These are supported funding model platforms
# Docs for this file can be found here:
# https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository

github: ["ErikBjare", "johan-bjareholt"]
github: ["ActivityWatch", "ErikBjare", "johan-bjareholt"]
patreon: "erikbjare"
open_collective: "activitywatch"
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL
liberapay: "ActivityWatch"
custom: ["https://activitywatch.net/donate/"]
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: "\U0001F41E Bug report"
about: Did you find a bug?
title: ''
labels: 'type: bug'
assignees: ''

---

<!--
Hi there! Thank you for discovering and submitting an issue.
Before you submit this; let's make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and complete them first.
-->

<!-- Checked checkbox should look like this: [x] -->
- [ ] I am on the [latest](https://github.com/ActivityWatch/activitywatch/releases/latest) ActivityWatch version.
- [ ] I have searched the issues of this repo and believe that this is not a duplicate.


<!--
Once those are done, if you're able to fill in the following list with your information,
it'd be very helpful to whoever handles the issue.
-->

- **OS name and version**: <!-- Replace this comment with OS name + version -->
- **ActivityWatch version**: <!-- Replace this comment with the ActivityWatch version (found at the bottom of the Web UI) -->

## Describe the bug
<!-- A clear and concise description of what the bug is. -->

## To Reproduce
<!--
Steps to reproduce the behavior, for example:
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
-->

## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->

## Documentation
<!--
If applicable, add screenshots or logs to help explain your problem.
Logs can be found in different places depending on platform:
- Windows: `C:\Users\<USER>\AppData\Local\ActivityWatch\Logs`
- macOS: `/Users/<USER>/Library/Logs/activitywatch`
- Linux: `/home/<USER>/.cache/activitywatch/log`
They can be opened with any plain text editor.
-->

## Additional context
<!-- Add any other context about the problem here. -->
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Issue templates are based on templates for poetry:
# https://github.com/python-poetry/poetry/tree/master/.github/ISSUE_TEMPLATE
blank_issues_enabled: false
contact_links:
- name: "\U0001F381 Feature requests"
url: https://forum.activitywatch.net/c/features
about: Request and vote on features on the forum.
- name: "\u2753 Support"
url: https://forum.activitywatch.net/
about: Need help with something? Ask for help on the forum!
- name: "\U0001F4AD Discussion (on our forum)"
url: https://forum.activitywatch.net/
about: The preferred place for general discussion about ActivityWatch
- name: "\U0001F4AD Discussion (on GitHub Discussions)"
url: https://forum.activitywatch.net/
about: We're testing it out (but the forum is still the preferred place).
- name: "\U0001F4AC Chat with us on Discord"
url: https://discord.gg/dctJK6USjK
about: We love to see people who are active in issues on our Discord, come join us!
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/everything-else.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: "\U0001F5C3 Everything Else"
about: For questions and issues that do not fall in any of the other categories.
title: ''
labels: ''
assignees: ''

---

<!-- Describe your question and issue here. This space is meant to be used for general questions that are neither bugs nor feature requests. If you're looking for help or support, please post on the forum instead: https://forum.activitywatch.net/ -->


<!-- Checked checkbox should look like this: [x] -->
- [ ] I have searched the [issues](https://github.com/ActivityWatch/activitywatch/issues) of this repo and believe that this is not a duplicate.
- [ ] I have searched the [documentation](https://docs.activitywatch.net/en/latest/) and believe that my question is not covered.

## Issue
<!-- Now feel free to write your issue, but please be descriptive! Thanks again 🙌 ❤️ -->
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ daysUntilStale: 180
daysUntilClose: 14
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- '!pinned'
- 'priority: high'
- 'improves: security'
# Label to use when marking an issue as stale
Expand Down
122 changes: 122 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
name: ${{ matrix.os }}, py-${{ matrix.python_version }}, node-${{ matrix.node_version }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
env:
RELEASE: false
# sets the macOS version target, see: https://users.rust-lang.org/t/compile-rust-binary-for-older-versions-of-mac-osx/38695
MACOSX_DEPLOYMENT_TARGET: 10.14
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-latest, macOS-latest]
python_version: [3.7]
node_version: [12]
experimental: [false]
include:
- os: ubuntu-18.04
python_version: 3.8
node_version: 12
experimental: true
- os: ubuntu-18.04
python_version: 3.9
node_version: 12
experimental: true
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
# Needed for `git describe --tags --abbrev=0` to work (used for getting the latest version tag)
- name: Fetch full git history
run: git fetch --prune --unshallow --tags
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Set up Rust nightly
uses: actions-rs/toolchain@v1
id: toolchain
with:
profile: minimal
toolchain: nightly
override: true
- name: Get npm cache dir
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1
name: Cache npm
env:
cache-name: node
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Cache cargo build
uses: actions/cache@v1
if: runner.os != 'macOS' # cache doesn't seem to behave nicely on macOS, see: https://github.com/ActivityWatch/aw-server-rust/issues/180
env:
cache-name: cargo-build-target
with:
path: aw-server-rust/target
# key needs to contain rustc_hash due to https://github.com/ActivityWatch/aw-server-rust/issues/180
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-
- name: Install dependencies
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
choco install innosetup
fi
pip install poetry virtualenv
- name: Build
shell: bash
run: |
python -m virtualenv venv
source venv/bin/activate || source venv/Scripts/activate
poetry install
make build
- name: Run tests
shell: bash
run: |
source venv/bin/activate || source venv/Scripts/activate
make test
# Don't run integration tests on Windows, doesn't work for some reason
- name: Run integration tests
if: "!startsWith(runner.os, 'windows')"
run: |
source venv/bin/activate || source venv/Scripts/activate
make test-integration
- name: Package
shell: bash
run: |
source venv/bin/activate || source venv/Scripts/activate
poetry install # run again to ensure we have the correct version of PyInstaller
make package
- name: Package dmg
if: startsWith(runner.os, 'macOS')
run: |
source venv/bin/activate
make dist/ActivityWatch.dmg;
mv dist/ActivityWatch.dmg dist/activitywatch-$(scripts/package/getversion.sh)-macos-x86_64.dmg;
- name: Upload packages
uses: actions/upload-artifact@v2-preview
with:
name: builds-${{ runner.os }}-py${{ matrix.python_version }}
path: dist/activitywatch-*.*

Loading

0 comments on commit 7018a72

Please sign in to comment.