Created .github/workflows/mac_checks.yml
This commit is contained in:
parent
b5a1cf3a14
commit
f908566252
16
.github/workflows/linux_checks.yml
vendored
16
.github/workflows/linux_checks.yml
vendored
@ -19,7 +19,8 @@ jobs:
|
|||||||
node-version: 12
|
node-version: 12
|
||||||
- name: Set up ripgrep, pyaudio, gettext, rename
|
- name: Set up ripgrep, pyaudio, gettext, rename
|
||||||
run: |
|
run: |
|
||||||
sudo apt update; sudo apt install portaudio19-dev gettext rename
|
sudo apt update
|
||||||
|
sudo apt install portaudio19-dev gettext rename
|
||||||
sudo snap install ripgrep --classic
|
sudo snap install ripgrep --classic
|
||||||
# Necessary for now for the cargo cache:
|
# Necessary for now for the cargo cache:
|
||||||
# https://github.com/actions/cache/issues/133#issuecomment-599102035
|
# https://github.com/actions/cache/issues/133#issuecomment-599102035
|
||||||
@ -45,14 +46,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
- name: Configure project variables
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=BUILDFLAGS::"
|
|
||||||
echo "::set-env name=RSPY_TARGET_DIR::~/target"
|
|
||||||
echo "::set-env name=CARGO_TARGET_DIR::~/target"
|
|
||||||
- name: Run checks
|
- name: Run checks
|
||||||
run: |
|
run: |
|
||||||
make check
|
export RSPY_TARGET_DIR=~/target
|
||||||
|
export CARGO_TARGET_DIR=~/target
|
||||||
|
make check BUILDFLAGS=""
|
||||||
- name: Run build
|
- name: Run build
|
||||||
run: |
|
run: |
|
||||||
make build
|
export RSPY_TARGET_DIR=~/target
|
||||||
|
export CARGO_TARGET_DIR=~/target
|
||||||
|
make build BUILDFLAGS=""
|
||||||
|
59
.github/workflows/mac_checks.yml
vendored
Normal file
59
.github/workflows/mac_checks.yml
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
name: Mac Tests
|
||||||
|
|
||||||
|
# on: [push, pull_request]
|
||||||
|
# Disables Mac OS builds until this gets fixed
|
||||||
|
# https://github.com/actions/virtual-environments/issues/602
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: macOS-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up python
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: 3.7
|
||||||
|
- name: Set up protoc
|
||||||
|
uses: Arduino/actions/setup-protoc@master
|
||||||
|
- name: Set up node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
- name: Set up brew packages
|
||||||
|
run: |
|
||||||
|
brew install portaudio protobuf gettext rename ripgrep
|
||||||
|
brew link gettext --force
|
||||||
|
- name: Cache cargo registry
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/registry
|
||||||
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
|
||||||
|
- name: Cache cargo index
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/git
|
||||||
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
|
||||||
|
- name: Cache cargo build
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/target
|
||||||
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
|
||||||
|
- name: Cache pip wheels
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/Library/Caches/pip
|
||||||
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
|
- name: Run checks
|
||||||
|
run: |
|
||||||
|
export RSPY_TARGET_DIR=~/target
|
||||||
|
export CARGO_TARGET_DIR=~/target
|
||||||
|
make check BUILDFLAGS=""
|
||||||
|
- name: Run build
|
||||||
|
run: |
|
||||||
|
export RSPY_TARGET_DIR=~/target
|
||||||
|
export CARGO_TARGET_DIR=~/target
|
||||||
|
make build BUILDFLAGS=""
|
12
.github/workflows/windows_checks.yml
vendored
12
.github/workflows/windows_checks.yml
vendored
@ -43,10 +43,10 @@ jobs:
|
|||||||
.\bash pacman-key --refresh-keys
|
.\bash pacman-key --refresh-keys
|
||||||
.\pacman -Tv
|
.\pacman -Tv
|
||||||
.\pacman -Syuv --overwrite='*'
|
.\pacman -Syuv --overwrite='*'
|
||||||
|
.\pacman --version
|
||||||
:: We must install bash first, otherwise we will have bash fork errors:
|
:: We must install bash first, otherwise we will have bash fork errors:
|
||||||
:: https://github.com/evandroforks/anki/runs/524857054?check_suite_focus=true
|
:: https://github.com/evandroforks/anki/runs/524857054?check_suite_focus=true
|
||||||
:: 0 [main] pacman 748 dofork: child -1 - forked process 2896 died unexpectedly
|
:: 0 [main] pacman 748 dofork: child -1 - forked process 2896 died unexpectedly
|
||||||
.\pacman --version
|
|
||||||
.\pacman -Sv --noconfirm --overwrite='*' bash
|
.\pacman -Sv --noconfirm --overwrite='*' bash
|
||||||
.\pacman -Sv --noconfirm --overwrite='*' rsync
|
.\pacman -Sv --noconfirm --overwrite='*' rsync
|
||||||
- name: Set up scoop, gettext, ripgrep
|
- name: Set up scoop, gettext, ripgrep
|
||||||
@ -78,24 +78,24 @@ jobs:
|
|||||||
- name: Cache cargo build
|
- name: Cache cargo build
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~\target
|
path: ${{ github.workspace }}\target
|
||||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- name: Cache pip wheels
|
- name: Cache pip wheels
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~\AppData\Local\pip\Cache
|
path: ~\AppData\Local\pip\Cache
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
- name: Configure project variables
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=RSPY_TARGET_DIR::~\target"
|
|
||||||
echo "::set-env name=CARGO_TARGET_DIR::~\target"
|
|
||||||
- name: Run checks
|
- name: Run checks
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
echo on
|
echo on
|
||||||
|
set "RSPY_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
||||||
|
set "CARGO_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
||||||
make check BUILDFLAGS=""
|
make check BUILDFLAGS=""
|
||||||
- name: Run build
|
- name: Run build
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
echo on
|
echo on
|
||||||
|
set "RSPY_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
||||||
|
set "CARGO_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
||||||
make build BUILDFLAGS=""
|
make build BUILDFLAGS=""
|
||||||
|
10
Makefile
10
Makefile
@ -65,8 +65,13 @@ pyenv:
|
|||||||
"${PYTHON_BIN}" -m venv pyenv && \
|
"${PYTHON_BIN}" -m venv pyenv && \
|
||||||
case "$$(uname -s)" in CYGWIN*|MINGW*|MSYS*) \
|
case "$$(uname -s)" in CYGWIN*|MINGW*|MSYS*) \
|
||||||
dos2unix "${ACTIVATE_SCRIPT}" && \
|
dos2unix "${ACTIVATE_SCRIPT}" && \
|
||||||
sed -i -- "s@VIRTUAL_ENV=\".*\"@VIRTUAL_ENV=\"$(shell pwd)/pyenv\"@g" "${ACTIVATE_SCRIPT}" \
|
# https://github.com/PyO3/maturin/issues/283 \
|
||||||
;; esac; \
|
# Expected `python` to be a python interpreter inside a virtualenv \
|
||||||
|
VIRTUAL_ENV="$$(pwd)" && \
|
||||||
|
VIRTUAL_ENV="$$(cygpath -m "$${VIRTUAL_ENV}")" && \
|
||||||
|
sed -i -- "s@VIRTUAL_ENV=\".*\"@VIRTUAL_ENV=\"$$(pwd)/pyenv\"@g" "${ACTIVATE_SCRIPT}" && \
|
||||||
|
sed -i -- "s@export PATH@export PATH; VIRTUAL_ENV=\"$${VIRTUAL_ENV}/pyenv\";@g" "${ACTIVATE_SCRIPT}" \
|
||||||
|
;; esac && \
|
||||||
. "${ACTIVATE_SCRIPT}" && \
|
. "${ACTIVATE_SCRIPT}" && \
|
||||||
python --version && \
|
python --version && \
|
||||||
python -m pip install --upgrade pip setuptools && \
|
python -m pip install --upgrade pip setuptools && \
|
||||||
@ -181,4 +186,3 @@ push-i18n-ftl: pull-i18n
|
|||||||
.PHONY: push-i18n-po
|
.PHONY: push-i18n-po
|
||||||
push-i18n-po: pull-i18n
|
push-i18n-po: pull-i18n
|
||||||
(cd qt/po && scripts/upload-latest-template)
|
(cd qt/po && scripts/upload-latest-template)
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ Mac users
|
|||||||
|
|
||||||
You can use homebrew to install some dependencies:
|
You can use homebrew to install some dependencies:
|
||||||
|
|
||||||
$ brew install python mpv lame portaudio protobuf npm rustup-init gettext rename
|
$ brew install python mpv lame portaudio protobuf npm rustup-init gettext rename ripgrep
|
||||||
|
|
||||||
$ brew link gettext --force
|
$ brew link gettext --force
|
||||||
|
|
||||||
|
@ -22,6 +22,6 @@ case "$(uname -s)" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cmd="rsync -a \"${TOOLS}/stubs/PyQt5/\" \"${modDir}/\""
|
cmd="rsync -a ${TOOLS}/stubs/PyQt5/ ${modDir}/"
|
||||||
|
|
||||||
$cmd > /dev/null 2>&1 || sudo $cmd
|
$cmd > /dev/null 2>&1 || sudo $cmd
|
||||||
|
Loading…
Reference in New Issue
Block a user