Skip to content

Commit

Permalink
[ change ][ ci ] Gather & compress executable with data files
Browse files Browse the repository at this point in the history
  • Loading branch information
banacorn committed Aug 29, 2021
1 parent d7eba43 commit 1f45d88
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 31 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/test-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,34 @@ jobs:
stack setup --install-ghc
df -h
- name: ⏬ Install haskell deps
- name: ⏬ Install dependencies
run: |
stack build --only-dependencies
- name: 🔨 Build and run tests
run: |
stack test
# artifacts:


- name: 📦 Install
id: install
run: |
stack install
- name: 📦 Compress files
id: zip
run: |
mkdir als
cp ~/.local/bin/als als/
find $(stack path --snapshot-install-root)/share -type d -name "Agda-*"
cp -r $(find $(stack path --snapshot-install-root)/share -type d -name "Agda-*") als/data
zip -r als als
mv als.zip als-ubuntu.zip
# locate the data-dir
datadir=$(find $(stack path --snapshot-install-root)/share -type d -name "Agda-*")
# locate the executable
executable=$(find $(stack path --local-install-root)/bin -name "als")
# make a temporary directory for compresssing
mkdir zip
cp -r $datadir zip/
cp $executable zip/
# compress
cd zip
zip -r als-ubuntu.zip *
cd ..
mv zip/als-ubuntu.zip .
- name: 🚢 Release Artifacts
uses: softprops/action-gh-release@v1
Expand Down
33 changes: 17 additions & 16 deletions .github/workflows/test-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,33 @@ jobs:
run: |
stack setup --install-ghc
- name: 📦 Specify `Agda_datadir`
run: |
export Agda_datadir=$PWD/data
- name: ⏬ Install haskell deps
- name: ⏬ Install dependencies
run: |
stack build --only-dependencies
- name: 🔨 Build and run tests
run: |
stack test
- name: 📦 Install
id: install
run: |
stack install
- name: 📦 Compress files
id: zip
run: |
mkdir als
cp ~/.local/bin/als als/
find $(stack path --snapshot-install-root)/share -type d -name "Agda-*"
cp -r $(find $(stack path --snapshot-install-root)/share -type d -name "Agda-*") als/data
zip -r als als
mv als.zip als-macos.zip
# locate the data-dir
datadir=$(find $(stack path --snapshot-install-root)/share -type d -name "Agda-*")
# locate the executable
executable=$(find $(stack path --local-install-root)/bin -name "als")
# make a temporary directory for compresssing
mkdir zip
cp -r $datadir zip/
cp $executable zip/
# compress
cd zip
zip -r als-macos.zip *
cd ..
mv zip/als-macos.zip .
- name: 🚢 Release Artifacts
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 1f45d88

Please sign in to comment.