Skip to content

Commit

Permalink
add mmc.mex to arch specific folder
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Mar 11, 2023
1 parent 7afb2c3 commit 4d04f44
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
make oct CC=gcc CXX=g++ LIBOPENCL='/c/Windows/System32/OpenCL.dll --verbose'
file ../mmclab/mmc.mex
fi
octave-cli --eval "fprintf(1,['OCTAVE_ARCH=' computer])"
octave-cli --eval "fprintf(1,['OCTAVE_ARCH=' computer])" >> $GITHUB_ENV
- name: Build binary
run: |
Expand All @@ -91,10 +92,12 @@ jobs:
- name: Create package folder
run: |
mkdir packages
mkdir -p mmclab/octave/${{ env.OCTAVE_ARCH }}
- name: Create release tag
run: perl -e "print 'RELEASE_TAG='. lc('${{ runner.os }}-${{ runner.arch }}-github-latest')" >> $GITHUB_ENV
- name: Zip mmclab
run: |
mv mmclab/mmc.mex mmclab/octave/${{ env.OCTAVE_ARCH }}
if [[ "$RUNNER_OS" == "Windows" ]]; then
7z a -tzip packages/mmclab-${{ env.RELEASE_TAG }}.zip mmclab
else
Expand All @@ -106,12 +109,6 @@ jobs:
with:
name: all-mmc-packages
path: packages/mmclab-${{ env.RELEASE_TAG }}.zip
- name: Copy mex file to arch folder
run: |
cd packages
mkdir -p mmclab/octave/${{ env.OCTAVE_ARCH }}
cp -a ../mmclab/mmc.mex mmclab/octave/${{ env.OCTAVE_ARCH }}
cd ..
- name: Prepare mmc package
run: |
mv src/bin .
Expand All @@ -124,9 +121,9 @@ jobs:
run: |
pwd
if [[ "$RUNNER_OS" == "Windows" ]]; then
7z a -tzip packages/mmc-${{ env.RELEASE_TAG }}.zip ../mmc -xr!packages
7z a -tzip packages/mmc-${{ env.RELEASE_TAG }}.zip ../mmc -xr!../mmc/packages
else
zip -FSr --symlink packages/mmc-${{ env.RELEASE_TAG }}.zip ../mmc -x 'packages*'
zip -FSr --symlink packages/mmc-${{ env.RELEASE_TAG }}.zip ../mmc -x '../mmc/packages*'
fi
- name: Upload mmc package
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-10.15' || matrix.os == 'windows-2019' }}
Expand All @@ -148,7 +145,7 @@ jobs:
- name: Create all-in-one octave mmclab
run: |
cd packages
unzip mmclab-linux*.zip -d mmclab
unzip mmclab*.zip -d mmclab
zip -FSr --symlink mmclab-octave-allinone-github-latest.zip mmclab
rm -rf mmclab
- name: Display structure of downloaded files
Expand Down

0 comments on commit 4d04f44

Please sign in to comment.