Skip to content

Commit

Permalink
Build in github-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kamo-naoyuki committed May 13, 2020
1 parent d32c00f commit 0d6b84b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 18 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/upload-release-asset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,28 @@ name: Upload Release Asset
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
strategy:
matrix:
# os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies for Linux
if: runner.os == 'Linux'
run: |
sudo apt-get install -qq -y g++ sox
# For OpenBlas
# sudo apt-get install -qq -y g++ sox liblapacke-dev gfortran
- name: run.sh
run: |
./run.sh
- name: Build project # This would actually build your project, using zip for an example artifact
run: |
touch a
zip --junk-paths my-artifact a
cp -r ./kaldi/src/featbin .
rm featbin/*.cc featbin/*.o
tar -zcvf ${{ matrix.os }}-featbin.tar.gz featbin
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -34,6 +48,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./my-artifact.zip
asset_name: my-artifact.zip
asset_content_type: application/zip
asset_path: ${{ matrix.os }}-featbin.tar.gz
asset_name: ${{ matrix.os }}-featbin.tar.gz
asset_content_type: application/gzip
33 changes: 21 additions & 12 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@
set -eu -o pipefail

echo "=== build kaldi ==="
git clone https://github.com/kaldi-asr/kaldi
(
set -eu -o pipefail

mkdir kaldi
cd kaldi
git checkout 29b3265104fc10ce3e06bfacb8f1e7ef9f16e3be
git init
git fetch --depth=1 git://github.com/kaldi-asr/kaldi 29b3265104fc10ce3e06bfacb8f1e7ef9f16e3be
git checkout FETCH_HEAD

(
cd tools
./extras/check_dependencies.sh
# ./extras/install_openblas.sh
sudo ./extras/install_mkl.sh
make -j4
set -eu -o pipefail

cd tools
./extras/check_dependencies.sh
# extras/install_openblas.sh
sudo ./extras/install_mkl.sh
make -j4
)
(
cd src
./configure --static --use-cuda=no # --mathlib=OPENBLAS
make -j4 depend
cd featbin
make -j4
set -eu -o pipefail

cd src
./configure --static --use-cuda=no # --mathlib=OPENBLAS
make -j4 depend
cd featbin
make -j4
)
)

0 comments on commit 0d6b84b

Please sign in to comment.