caffe #99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: caffe | |
# Controls when the action will run. | |
on: | |
# Build every 7 days | |
schedule: | |
- cron: "0 0 * * 0" | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master, runner ] | |
paths: [ '**caffe.yml' ] | |
pull_request: | |
branches: [ master, runner ] | |
paths: [ '**caffe.yml' ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build-caffe" | |
build-caffe: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Prerequisites | |
run: | | |
# Packages | |
sudo apt install -y pcregrep patchelf git | |
# Create build dir | |
git clone https://github.com/ruanformigoni/wine.git build && cd build | |
# Get appimagebuilder | |
wget -q "https://github.com/AppImageCrafters/appimage-builder/releases/download/Continuous/appimage-builder-1.1.1.dev32+g2709a3b-x86_64.AppImage" -O appimage-builder | |
chmod +x appimage-builder | |
./appimage-builder --appimage-extract | |
rm appimage-builder | |
mv squashfs-root appimage-builder | |
# Get wine version | |
- name: Version | |
id: version | |
run: | | |
chmod +x fetch.sh | |
version_wine="$(./fetch.sh caffe --version)" | |
echo "version_wine=$version_wine" >> $GITHUB_ENV | |
echo "version_wine=$version_wine" >> $GITHUB_OUTPUT | |
# Builds the appimage | |
- name: Build appimage | |
run: | | |
# add dir dist | |
mkdir dist | |
# Enter build dir | |
cd build | |
# Select caffe | |
sed -i 's/BOTTLES_RUNNER/caffe/' ../wine-bottles.yml | |
./appimage-builder/AppRun --recipe ../wine-bottles.yml | |
mv *.AppImage ../dist/wine-caffe-${{ env.version_wine }}-continuous-x86_64.AppImage | |
cd .. && rm -rf build | |
# Builds the appimage with portable glibc for wine | |
- name: Build glibc-i686 appimage | |
run: | | |
# Create and enter build dir | |
git clone https://github.com/ruanformigoni/wine.git build && cd build | |
# Fetch | |
chmod +x fetch.sh && ./fetch.sh "caffe" | |
# add patch | |
../patch.sh ../dist/wine-caffe-${{ env.version_wine }}-continuous-x86_64.AppImage | |
mv *.AppImage ../dist/wine-caffe-${{ env.version_wine }}-continuous-x86_64-portable-glibc-i386.AppImage | |
# # Fetches prefix | |
# - name: Wine Prefix | |
# run: | | |
# wget -q --show-progress --progress=dot:mega \ | |
# https://github.com/ruanformigoni/wine/releases/download/continuous-ge/wineprefix-64.tar.xz | |
# wget -q --show-progress --progress=dot:mega \ | |
# https://github.com/ruanformigoni/wine/releases/download/continuous-ge/wineprefix-32.tar.xz | |
# mv wineprefix-64.tar.xz dist/ | |
# mv wineprefix-32.tar.xz dist/ | |
- name: Upload artifact | |
uses: actions/[email protected] | |
with: | |
name: wine-caffe | |
path: 'dist' | |
outputs: | |
version: ${{ steps.version.outputs.version_wine }} | |
release-caffe: | |
permissions: write-all | |
needs: [build-caffe] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v1 | |
with: | |
name: wine-caffe | |
- name: release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
title: Continuous caffe ${{ needs.build-caffe.outputs.version }} | |
automatic_release_tag: continuous-caffe | |
prerelease: false | |
draft: false | |
files: | | |
wine-caffe | |
repo_token: ${{ secrets.GITHUB_TOKEN }} |