Skip to content

Commit

Permalink
Merge pull request #544 from ActivityWatch/dev/python-experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Dec 28, 2020
2 parents 26b6489 + bfd5a4d commit 0b19032
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 177 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,29 @@ on:

jobs:
build:
name: ${{ matrix.os }}, py-${{ matrix.python_version}}, node-${{ matrix.node_version }}
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:
# # Experimental: Python 3.8
# - os: ubuntu-18.04
# python_version: 3.8
# node_version: 12
# experimental: true
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:
Expand All @@ -43,6 +48,7 @@ jobs:
node-version: ${{ matrix.node_version }}
- name: Set up Rust nightly
uses: actions-rs/toolchain@v1
id: toolchain
with:
profile: minimal
toolchain: nightly
Expand All @@ -66,9 +72,10 @@ jobs:
cache-name: cargo-build-target
with:
path: aw-server-rust/target
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }}
# 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 }}-
${{ runner.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-
- name: Install dependencies
shell: bash
run: |
Expand Down Expand Up @@ -109,6 +116,6 @@ jobs:
- name: Upload packages
uses: actions/upload-artifact@v2-preview
with:
name: builds-${{ runner.os }}
name: builds-${{ runner.os }}-py${{ matrix.python_version }}
path: dist/activitywatch-*.*

34 changes: 1 addition & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,8 @@ jobs:
env:
- DEPLOY=true
- TRAVIS_NODE_VERSION=12
#- os: windows
# language: sh
# python: 3.6.8
# env:
# - DEPLOY=false # set to true when tested and AppVeyor is deprecated
# - TRAVIS_NODE_VERSION=12
# - TRAVIS_PYTHON_VERSION=3.6.8
allow_failures:
- os: windows

before_install:
# Windows:
# - Enable long paths
# - Install Python
# - Install node/npm using nvs
# - Install make
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
./scripts/ci/enable_long_paths.bat;
choco install -y python --version=$TRAVIS_PYTHON_VERSION;
cp /c/Python36/python.exe /c/Python36/python3.exe;
export PATH="/c/Python36:/c/Python36/Scripts:$PATH";
export NVS_HOME="C:\ProgramData\nvs";
git clone --single-branch https://github.com/jasongin/nvs $NVS_HOME;
source $NVS_HOME/nvs.sh;
export PATH="./node_modules/.bin:$PATH";
nvs add node/$TRAVIS_NODE_VERSION;
nvs use node/$TRAVIS_NODE_VERSION;
choco install -y make;
fi
# macOS:
# - Install Python 3.7
# - Install node using nvm
Expand Down Expand Up @@ -90,12 +63,6 @@ before_install:
- pip3 --version
- node --version
- npm --version
# Set up a virtualenv on Windows
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
pip3 install virtualenv;
virtualenv -p python3 ~/venv;
source ~/venv/Scripts/activate;
fi
# Set up a virtualenv on macOS
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
pip3 install virtualenv;
Expand Down Expand Up @@ -144,4 +111,5 @@ deploy:
local_dir: dist
acl: public_read
on:
all_branches: true
condition: $DEPLOY = true
2 changes: 1 addition & 1 deletion aw-qt
2 changes: 1 addition & 1 deletion aw-server-rust
Loading

0 comments on commit 0b19032

Please sign in to comment.