Skip to content

Commit

Permalink
Fix uploading single-header llama.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber authored and actions-user committed Jun 17, 2022
1 parent 0faaa43 commit 3cbe33b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/single-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: clone single-header
run: |
git clone -b single-header https://x-access-token:${{secrets.github_token}}@github.com/${{github.repository}}.git single-header
- name: create-single-header.sh
run: |
./tools/create-single-header.sh
- name: commit
run: |
cd single-header
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add llama.hpp
Expand Down
5 changes: 3 additions & 2 deletions tools/create-single-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

workingcopy_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )/.."
amalgamate_tmp_dir=$workingcopy_dir/_amalgamate_tmp
destination_dir=$workingcopy_dir/single_header
destination_dir=$workingcopy_dir/single-header

git clone https://github.com/shrpnsld/amalgamate.git --depth 1 $amalgamate_tmp_dir/clone
cd include/llama
$amalgamate_tmp_dir/clone/amalgamate -o $amalgamate_tmp_dir -H -v -a -n 'llama'
cd ../..
mv $amalgamate_tmp_dir/llama-amalgamated/llama.hpp $workingcopy_dir
mkdir -p $destination_dir
mv $amalgamate_tmp_dir/llama-amalgamated/llama.hpp $destination_dir
rm -rf $amalgamate_tmp_dir

0 comments on commit 3cbe33b

Please sign in to comment.