Added parallel build script.

pull/61/head
Revertron 3 years ago
parent bdbe99c7df
commit e3a2b6759b

@ -0,0 +1,168 @@
on:
push:
tags: v[0-9].[0-9]+.[0-9]+
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always
name: Create release
jobs:
get_version:
name: Get version from Git tag
runs-on: ubuntu-latest
outputs:
project_version: ${{ env.VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Getting version
#run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
run: echo "VERSION=0.0.1" >> $GITHUB_ENV
create_release:
name: Create Release
runs-on: ubuntu-latest
needs: get_version
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ needs.get_version.outputs.project_version }}
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
body: |
## A new version
* Various fixes and stability improvements.
draft: true
prerelease: false
linux-nogui:
name: Create and upload builds
needs: [ create_release, get_version ]
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ amd64, i686, mips, mipsel, armhf, arm64 ]
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: install dependencies
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt update && sudo apt upgrade && sudo apt install libwebkit2gtk-4.0-dev upx
cargo install cross
- name: Build and package deb packages
if: contains(matrix.os, 'ubuntu')
run: PKGARCH=${{ matrix.arch }} contrib/deb/generate.sh
- name: Upload bins & debs
if: contains(matrix.os, 'ubuntu')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag_name="${{ needs.get_version.outputs.project_version }}"
hub release edit $(find ./bin -type f -name "alfis-*" -printf "-a %p ") -m "" "$tag_name"
hub release edit $(find . -type f -name "*.deb" -printf "-a %p ") -m "" "$tag_name"
build-and-upload-gui-zips:
name: Create and upload builds
needs: [ create_release, get_version ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macOS-latest ]
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: install dependencies
if: contains(matrix.os, 'ubuntu')
run: sudo apt update && apt upgrade && sudo apt install libwebkit2gtk-4.0-dev upx
- name: Build release binaries
run: cargo build --release
- name: Build Windows release binaries with Edge web-engine
if: contains(matrix.os, 'windows')
run: cargo build --release --features "edge" --target-dir edge
- name: windows
if: contains(matrix.os, 'windows')
run: |
echo "BIN_ARCH=windows-amd64" >> $GITHUB_ENV
echo "BIN_ARCH_EDGE=windows-amd64-edge" >> $GITHUB_ENV
- name: linux
if: contains(matrix.os, 'ubuntu')
run: echo "BIN_ARCH=linux-amd64" >> $GITHUB_ENV
- name: macos
if: contains(matrix.os, 'mac')
run: echo "BIN_ARCH=darwin-amd64" >> $GITHUB_ENV
- name: Fill variables
run: |
echo "BIN_PATH=./target/release/alfis" >> $GITHUB_ENV
echo "ZIP_NAME=alfis-${{env.BIN_ARCH}}-${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV
- name: Windows variables
if: contains(matrix.os, 'windows')
run: |
echo "BIN_PATH=target/release/alfis.exe" >> $GITHUB_ENV
echo "ZIP_NAME=alfis-${{env.BIN_ARCH}}-${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV
echo "BIN_PATH_EDGE=edge/release/alfis.exe" >> $GITHUB_ENV
echo "ZIP_NAME_EDGE=alfis-${{env.BIN_ARCH}}-${{ needs.get_version.outputs.project_version }}-edge.zip" >> $GITHUB_ENV
- name: Packaging
uses: papeloto/action-zip@v1
with:
files: ${{ env.BIN_PATH }} alfis.toml README.md LICENSE adblock.txt
dest: ${{ env.ZIP_NAME }}
- name: Packaging Edge binary
if: contains(matrix.os, 'windows')
uses: papeloto/action-zip@v1
with:
files: ${{ env.BIN_PATH_EDGE }} alfis.toml README.md LICENSE adblock.txt
dest: ${{ env.ZIP_NAME_EDGE }}
- name: Upload zip
id: upload-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.make_release.outputs.upload_url }}
asset_path: ${{ env.ZIP_NAME }}
asset_name: ${{ env.ZIP_NAME }}
asset_content_type: application/zip
- name: Upload Edge binary
if: contains(matrix.os, 'windows')
id: upload-edge-binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.make_release.outputs.upload_url }}
asset_path: ${{ env.ZIP_NAME_EDGE }}
asset_name: ${{ env.ZIP_NAME_EDGE }}
asset_content_type: application/zip

@ -132,7 +132,7 @@
</span>
</div>
<div class="control has-icons-left">
<input class="input" type="number" placeholder="Difficulty: 20-28" id="new_zone_difficulty" oninput="onZoneChange()" title="How difficult it will be to mine domains in this zone? Good numbers are 20-28.">
<input class="input" type="number" placeholder="Difficulty: 22-28" id="new_zone_difficulty" oninput="onZoneChange()" title="How difficult it will be to mine domains in this zone? Good numbers are 20-28.">
<span class="icon is-small is-left">
<svg viewBox="0 0 24 24" style="width: 24px; height: 24px;"><path d="M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z"></path></svg>
</span>

Loading…
Cancel
Save