-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [CI] Move builds to reusable workflow * [CI] Publish job
- Loading branch information
1 parent
f4d29b6
commit 90c4759
Showing
7 changed files
with
236 additions
and
82 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: macOS | ||
description: Build macOS builds | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
- name: copy binary | ||
shell: bash | ||
run: cp target/release/neothesia .github/app/Neothesia.app/Contents/MacOS | ||
- name: zip binary | ||
shell: bash | ||
run: cd .github/app/ && zip -r app.zip Neothesia.app && cd ../.. | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: macos-artifact | ||
path: .github/app/app.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Ubuntu Recorder | ||
description: Build ubuntu recorder builds | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install alsa | ||
shell: bash | ||
run: sudo apt update && sudo apt install libasound2-dev libgtk-3-dev libavcodec-dev libavformat-dev libswscale-dev | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release -p neothesia-cli | ||
- name: Chmod +x | ||
shell: bash | ||
run: chmod +x target/release/neothesia-cli | ||
- name: zip binary | ||
shell: bash | ||
run: zip -rj app.zip target/release/neothesia-cli | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: ubuntu-recorder-artifact | ||
path: app.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Ubuntu | ||
description: Build ubuntu builds | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install alsa | ||
shell: bash | ||
run: sudo apt update && sudo apt install libasound2-dev libgtk-3-dev | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
- name: Chmod +x | ||
shell: bash | ||
run: chmod +x target/release/neothesia | ||
- name: zip binary | ||
shell: bash | ||
run: zip -rj app.zip target/release/neothesia | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: ubuntu-artifact | ||
path: app.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Windows | ||
description: Build Windows builds | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install dependencies | ||
shell: powershell | ||
run: | | ||
$VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath) | ||
Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n" | ||
Invoke-WebRequest "${env:FFMPEG_DOWNLOAD_URL}" -OutFile ffmpeg-release-full-shared.7z | ||
7z x ffmpeg-release-full-shared.7z | ||
mkdir ffmpeg | ||
mv ffmpeg-*/* ffmpeg/ | ||
Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n" | ||
Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n" | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release -p neothesia-cli | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: windows-recorder-artifact | ||
path: target/release/neothesia-cli.exe |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Windows | ||
description: Build Windows builds | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: windows-artifact | ||
path: target/release/neothesia.exe |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build_ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: Build | ||
uses: ./.github/actions/ubuntu | ||
- name: ls | ||
run: ls -l app.zip | ||
- name: Rename | ||
run: mv app.zip neothesia-ubuntu.zip | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
files: neothesia-ubuntu.zip | ||
|
||
build_ubuntu_recorder: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: Build | ||
uses: ./.github/actions/ubuntu-recorder | ||
- name: ls | ||
run: ls -l app.zip | ||
- name: Rename | ||
run: mv app.zip neothesia-cli-ubuntu.zip | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
files: neothesia-cli-ubuntu.zip | ||
|
||
build_windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: Build | ||
uses: ./.github/actions/windows | ||
- name: ls | ||
run: ls -l target/release/neothesia.exe | ||
- name: Rename | ||
run: Move-Item -Path target/release/neothesia.exe -Destination neothesia.exe | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
files: neothesia.exe | ||
|
||
build_windows_recorder: | ||
runs-on: windows-latest | ||
|
||
env: | ||
FFMPEG_DOWNLOAD_URL: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: Build | ||
uses: ./.github/actions/windows-recorder | ||
- name: ls | ||
run: ls -l target/release/neothesia-cli.exe | ||
- name: Rename | ||
run: Move-Item -Path target/release/neothesia-cli.exe -Destination neothesia-cli.exe | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
files: neothesia-cli.exe | ||
|
||
build_macos: | ||
runs-on: macos-latest | ||
|
||
env: | ||
MACOSX_DEPLOYMENT_TARGET: 10.12 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: Build | ||
uses: ./.github/actions/macos | ||
- name: ls | ||
run: ls -l .github/app/app.zip | ||
- name: Rename | ||
run: mv .github/app/app.zip neothesia-macos.zip | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
files: neothesia-macos.zip | ||
|
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