From 2931f53bc8f3c3c491b37beb10fa268a71bd7c71 Mon Sep 17 00:00:00 2001 From: KaizIqbal <24286590+KaizIqbal@users.noreply.github.com> Date: Wed, 29 Jul 2020 07:38:04 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20GitHub=20Action=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 71 +++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..dc3d631 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,71 @@ +on: + push: + paths-ignore: + - README.md + - LICENSE + branches: [master, dev] + + pull_request: + paths-ignore: + - README.md + - LICENSE + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install build dependencies (apt) + run: | + sudo apt install libx11-dev libxcursor-dev libpng-dev + continue-on-error: false + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install npm packages + - uses: borales/actions-yarn@v2.0.0 + with: + cmd: install # will run `yarn install` command + + - name: Generating Bitmaps + - uses: borales/actions-yarn@v2.0.0 + with: + cmd: render # will run `yarn render` command + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + + - name: Cache pip dependencies + uses: actions/cache@v2 + with: + # This path is specific to Ubuntu + path: ~/.cache/pip + # Look to see if there is a cache hit for the corresponding requirements file + key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + + - name: Install pip dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + continue-on-error: false + + - name: Generating `MacOS Big Sur` Cursor Theme + run: python build.py