compatiblity with GHC 9.12 and random-1.3 #78
Workflow file for this run
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
name: srtols Release | |
on: | |
# Trigger the workflow on the new 'v*' tag created | |
push: | |
tags: | |
- "v*" | |
jobs: | |
create_release: | |
name: Create Github Release | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: true | |
prerelease: false | |
build_artifact: | |
needs: [create_release] | |
name: ${{ matrix.os }}/GHC ${{ matrix.ghc }}/${{ github.ref }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
ghc: | |
- 9.10.1 | |
cabal: ["3.14.1.1"] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set tag name | |
uses: olegtarasov/[email protected] | |
id: tag | |
with: | |
tagRegex: "v(.*)" | |
tagRegexGroup: 1 | |
- name: Setup Haskell | |
uses: haskell-actions/setup@v2 | |
id: setup-haskell-cabal | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Cache ~/.cabal/store | |
uses: actions/cache@v2 | |
with: | |
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ github.sha }} | |
path: ~/.cabal/store | |
- if: matrix.os == 'ubuntu-latest' | |
name: Install ubuntu dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libnlopt-dev libnlopt0 | |
- if: matrix.os == 'macOS-latest' | |
name: Install macOS dependencies | |
run: | | |
brew install nlopt | |
ls $(brew --prefix)/Cellar/nlopt/2.9.1/lib/ | |
echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}" | |
echo "PKG_CONFIG_PATH=$(brew --prefix)/Cellar/nlopt/2.9.1/lib/pkgconfig" >> "${GITHUB_ENV}" | |
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" | |
echo "LD_LIBRARY_PATH=$(brew --prefix)/Cellar/nlopt/2.9.1/lib" >> "${GITHUB_ENV}" | |
echo "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}" | |
echo "DYLD_LIBRARY_PATH=$(brew --prefix)/Cellar/nlopt/2.9.1/lib" >> "${GITHUB_ENV}" | |
- if: matrix.os == 'windows-latest' | |
name: Build windows binary | |
run: | | |
stack exec -- pacman --noconfirm -Sy msys2-keyring | |
stack exec -- pacman --noconfirm -S mingw-w64-x86_64-pkgconf | |
stack exec -- pacman --noconfirm -S mingw-w64-x86_64-nlopt | |
mkdir dist | |
stack build srtree:egraphGP --copy-bins --local-bin-path=dist | |
stack build srtree:egraphSearch --copy-bins --local-bin-path=dist | |
stack build srtree:srtools --copy-bins --local-bin-path=dist | |
stack build srtree:rEGGression --copy-bins --local-bin-path=dist | |
stack build srtree:srsimplify --copy-bins --local-bin-path=dist | |
mv dist/egraphGP.exe dist/egraphGP-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}.exe | |
mv dist/egraphSearch.exe dist/egraphSearch-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}.exe | |
mv dist/srtools.exe dist/srtools-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}.exe | |
mv dist/reggression.exe dist/reggression-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}.exe | |
mv dist/srsimplify.exe dist/srsimplify-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}.exe | |
- if: matrix.os == 'macOS-latest' | |
name: Build binary on maxOS | |
run: | | |
mkdir dist | |
cabal install srtree:egraphGP --install-method=copy --overwrite-policy=always --installdir=dist --extra-lib-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/lib --extra-include-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/include | |
cabal install srtree:egraphSearch --install-method=copy --overwrite-policy=always --installdir=dist --extra-lib-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/lib --extra-include-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/include | |
cabal install srtree:srtools --install-method=copy --overwrite-policy=always --installdir=dist --extra-lib-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/lib --extra-include-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/include | |
cabal install srtree:rEGGression --install-method=copy --overwrite-policy=always --installdir=dist --extra-lib-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/lib --extra-include-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/include | |
cabal install srtree:srsimplify --install-method=copy --overwrite-policy=always --installdir=dist --extra-lib-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/lib --extra-include-dirs=/opt/homebrew/Cellar/nlopt/2.9.1/include | |
mv dist/egraphGP dist/egraphGP-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
mv dist/egraphSearch dist/egraphSearch-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
mv dist/srtools dist/srtools-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
mv dist/reggression dist/reggression-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
mv dist/srsimplify dist/srsimplify-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
- if: matrix.os == 'ubuntu-latest' | |
name: Build binary on Ubuntu | |
run: | | |
mkdir dist | |
cabal install srtree:egraphGP --install-method=copy --overwrite-policy=always --installdir=dist | |
cabal install srtree:egraphSearch --install-method=copy --overwrite-policy=always --installdir=dist | |
cabal install srtree:srtools --install-method=copy --overwrite-policy=always --installdir=dist | |
cabal install srtree:reggression --install-method=copy --overwrite-policy=always --installdir=dist | |
cabal install srtree:srsimplify --install-method=copy --overwrite-policy=always --installdir=dist | |
mv dist/egraphGP dist/egraphGP-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
mv dist/egraphSearch dist/egraphSearch-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
mv dist/srtools dist/srtools-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
mv dist/reggression dist/reggression-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
mv dist/srsimplify dist/srsimplify-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }} | |
ls dist | |
- if: matrix.os == 'windows-latest' | |
name: Set extension to .exe on Windows | |
run: echo "EXT=.exe" >> $GITHUB_ENV | |
- name: Set binary path name | |
run: | | |
echo "BINARY_PATH1=./dist" >> $GITHUB_ENV | |
echo "BINARY_PATH2=./dist" >> $GITHUB_ENV | |
echo "BINARY_PATH2=./dist" >> $GITHUB_ENV | |
echo "BINARY_PATH2=./dist" >> $GITHUB_ENV | |
echo "BINARY_PATH2=./dist" >> $GITHUB_ENV | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
${{ env.BINARY_PATH1 }}/srsimplify-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}${{ env.EXT }} | |
${{ env.BINARY_PATH2 }}/srtools-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}${{ env.EXT }} | |
${{ env.BINARY_PATH2 }}/egraphSearch-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}${{ env.EXT }} | |
${{ env.BINARY_PATH2 }}/egraphGP-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}${{ env.EXT }} | |
${{ env.BINARY_PATH2 }}/reggression-${{ steps.tag.outputs.tag }}-${{ runner.os }}-ghc-${{ matrix.ghc }}${{ env.EXT }} |