Skip to content

Commit 0b19032

Browse files
authored
Merge pull request #544 from ActivityWatch/dev/python-experimental
2 parents 26b6489 + bfd5a4d commit 0b19032

7 files changed

Lines changed: 206 additions & 177 deletions

File tree

.github/workflows/build.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,29 @@ on:
88

99
jobs:
1010
build:
11-
name: ${{ matrix.os }}, py-${{ matrix.python_version}}, node-${{ matrix.node_version }}
11+
name: ${{ matrix.os }}, py-${{ matrix.python_version }}, node-${{ matrix.node_version }}
1212
runs-on: ${{ matrix.os }}
1313
continue-on-error: ${{ matrix.experimental }}
1414
env:
1515
RELEASE: false
16+
# sets the macOS version target, see: https://users.rust-lang.org/t/compile-rust-binary-for-older-versions-of-mac-osx/38695
17+
MACOSX_DEPLOYMENT_TARGET: 10.14
1618
strategy:
1719
fail-fast: false
1820
matrix:
1921
os: [ubuntu-18.04, windows-latest, macOS-latest]
2022
python_version: [3.7]
2123
node_version: [12]
2224
experimental: [false]
23-
#include:
24-
# # Experimental: Python 3.8
25-
# - os: ubuntu-18.04
26-
# python_version: 3.8
27-
# node_version: 12
28-
# experimental: true
25+
include:
26+
- os: ubuntu-18.04
27+
python_version: 3.8
28+
node_version: 12
29+
experimental: true
30+
- os: ubuntu-18.04
31+
python_version: 3.9
32+
node_version: 12
33+
experimental: true
2934
steps:
3035
- uses: actions/checkout@v2
3136
with:
@@ -43,6 +48,7 @@ jobs:
4348
node-version: ${{ matrix.node_version }}
4449
- name: Set up Rust nightly
4550
uses: actions-rs/toolchain@v1
51+
id: toolchain
4652
with:
4753
profile: minimal
4854
toolchain: nightly
@@ -66,9 +72,10 @@ jobs:
6672
cache-name: cargo-build-target
6773
with:
6874
path: aw-server-rust/target
69-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }}
75+
# key needs to contain rustc_hash due to https://github.com/ActivityWatch/aw-server-rust/issues/180
76+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
7077
restore-keys: |
71-
${{ runner.os }}-${{ env.cache-name }}-
78+
${{ runner.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-
7279
- name: Install dependencies
7380
shell: bash
7481
run: |
@@ -109,6 +116,6 @@ jobs:
109116
- name: Upload packages
110117
uses: actions/upload-artifact@v2-preview
111118
with:
112-
name: builds-${{ runner.os }}
119+
name: builds-${{ runner.os }}-py${{ matrix.python_version }}
113120
path: dist/activitywatch-*.*
114121

.travis.yml

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -32,35 +32,8 @@ jobs:
3232
env:
3333
- DEPLOY=true
3434
- TRAVIS_NODE_VERSION=12
35-
#- os: windows
36-
# language: sh
37-
# python: 3.6.8
38-
# env:
39-
# - DEPLOY=false # set to true when tested and AppVeyor is deprecated
40-
# - TRAVIS_NODE_VERSION=12
41-
# - TRAVIS_PYTHON_VERSION=3.6.8
42-
allow_failures:
43-
- os: windows
4435

4536
before_install:
46-
# Windows:
47-
# - Enable long paths
48-
# - Install Python
49-
# - Install node/npm using nvs
50-
# - Install make
51-
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
52-
./scripts/ci/enable_long_paths.bat;
53-
choco install -y python --version=$TRAVIS_PYTHON_VERSION;
54-
cp /c/Python36/python.exe /c/Python36/python3.exe;
55-
export PATH="/c/Python36:/c/Python36/Scripts:$PATH";
56-
export NVS_HOME="C:\ProgramData\nvs";
57-
git clone --single-branch https://github.com/jasongin/nvs $NVS_HOME;
58-
source $NVS_HOME/nvs.sh;
59-
export PATH="./node_modules/.bin:$PATH";
60-
nvs add node/$TRAVIS_NODE_VERSION;
61-
nvs use node/$TRAVIS_NODE_VERSION;
62-
choco install -y make;
63-
fi
6437
# macOS:
6538
# - Install Python 3.7
6639
# - Install node using nvm
@@ -90,12 +63,6 @@ before_install:
9063
- pip3 --version
9164
- node --version
9265
- npm --version
93-
# Set up a virtualenv on Windows
94-
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
95-
pip3 install virtualenv;
96-
virtualenv -p python3 ~/venv;
97-
source ~/venv/Scripts/activate;
98-
fi
9966
# Set up a virtualenv on macOS
10067
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
10168
pip3 install virtualenv;
@@ -144,4 +111,5 @@ deploy:
144111
local_dir: dist
145112
acl: public_read
146113
on:
114+
all_branches: true
147115
condition: $DEPLOY = true

0 commit comments

Comments
 (0)