Change runner to github
This commit is contained in:
parent
139533277f
commit
9242d0ff61
|
@ -23,7 +23,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python_version:
|
python_version:
|
||||||
- '3.10'
|
- '3.11'
|
||||||
os:
|
os:
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
|
|
||||||
|
@ -39,20 +39,24 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python_version }}
|
python-version: ${{ matrix.python_version }}
|
||||||
|
|
||||||
- name: Get latest FOP
|
|
||||||
run: wget -O FOP.py "https://raw.githubusercontent.com/easylist/easylist/master/FOP.py"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
if [ -f requirements.txt ]; then pip install --no-cache -I -r requirements.txt; fi
|
if [ -f requirements.txt ]; then pip install --no-cache -I -r requirements.txt; fi
|
||||||
|
|
||||||
- name: Render the rules
|
- name: Install hostlist-compiler
|
||||||
run: |
|
run: |
|
||||||
BUILD="$(git rev-parse --short HEAD)"
|
npm i -g @adguard/hostlist-compiler
|
||||||
flrender -v -i ublockorigin-rules=. adblocker-rules.template _public/blockrules.txt
|
hostlist-compiler -c tools/hostscompilerconf.json
|
||||||
sed -i -e "s/\! BuildID:/\! BuildID: $BUILD/g" _public/blockrules.txt
|
-o _public/blockrules.txt
|
||||||
head -n 5 _public/blockrules.txt
|
hostlist-compiler -c tools/noise.json -o _public/noise.txt
|
||||||
|
|
||||||
|
# - name: Render the rules
|
||||||
|
# run: |
|
||||||
|
# BUILD="$(git rev-parse --short HEAD)"
|
||||||
|
# flrender -v -i ublockorigin-rules=. adblocker-rules.template _public/blockrules.txt
|
||||||
|
# sed -i -e "s/\! BuildID:/\! BuildID: $BUILD/g" _public/blockrules.txt
|
||||||
|
# head -n 5 _public/blockrules.txt
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
|
@ -6,16 +6,6 @@ variables:
|
||||||
PIP_CACHE_DIR: '$CI_PROJECT_DIR/.cache/pip'
|
PIP_CACHE_DIR: '$CI_PROJECT_DIR/.cache/pip'
|
||||||
GIT_STRATEGY: clone
|
GIT_STRATEGY: clone
|
||||||
|
|
||||||
# https://about.gitlab.com/blog/2022/09/12/a-visual-guide-to-gitlab-ci-caching/#local-cache-docker-volume
|
|
||||||
# We can use file names as keys as well https://docs.gitlab.com/ee/ci/yaml/index.html#cachekeyfiles
|
|
||||||
# default:
|
|
||||||
# cache:
|
|
||||||
# key: $CI_COMMIT_REF_NAME
|
|
||||||
# key:
|
|
||||||
# files:
|
|
||||||
# - blockrules.txt
|
|
||||||
# - noise.txt
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
key: $CI_COMMIT_SHORT_SHA
|
key: $CI_COMMIT_SHORT_SHA
|
||||||
paths:
|
paths:
|
Loading…
Reference in New Issue