diff --git a/.github/workflows/nmodl-wheel.yml b/.github/workflows/nmodl-wheel.yml index f848d7f893..08d8016526 100644 --- a/.github/workflows/nmodl-wheel.yml +++ b/.github/workflows/nmodl-wheel.yml @@ -42,9 +42,11 @@ jobs: PATH="/opt/homebrew/opt/flex/bin:/opt/homebrew/opt/bison/bin:/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH" MACOSX_DEPLOYMENT_TARGET='10.15' CIBW_CONFIG_SETTINGS_MACOS: "build-dir=_build" + CIBW_ENVIRONMENT_LINUX: > + PATH=/nmodlwheel/flex/bin:/nmodlwheel/bison/bin:$PATH # use custom image for now CIBW_MANYLINUX_AARCH64_IMAGE: docker.io/jcgoran/nmodl:wheel-aarch64 - CIBW_BEFORE_BUILD_LINUX: yum install -y bison flex + CIBW_BEFORE_BUILD_LINUX: bash packaging/install_dependencies.sh - uses: actions/upload-artifact@v4 with: diff --git a/packaging/install_dependencies.sh b/packaging/install_dependencies.sh new file mode 100644 index 0000000000..3c98d18b4c --- /dev/null +++ b/packaging/install_dependencies.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# TODO put all of this inside of a Docker image to save time + +set -xe + +yum -y install \ + git \ + wget \ + make \ + vim \ + curl \ + unzip \ + autoconf \ + automake \ + make \ + openssh-server \ + libtool \ + && yum -y clean all \ + && rm -rf /var/cache + +curl -L -o flex-2.6.4.tar.gz https://github.com/westes/flex/files/981163/flex-2.6.4.tar.gz \ + && tar -xvzf flex-2.6.4.tar.gz \ + && cd flex-2.6.4 \ + && ./configure --prefix=/nmodlwheel/flex \ + && make -j 3 install \ + && cd .. \ + && rm -rf flex-2.6.4.tar.gz flex-2.6.4 +curl -L -o bison-3.7.3.tar.gz https://ftp.gnu.org/gnu/bison/bison-3.7.3.tar.gz \ + && tar -xvzf bison-3.7.3.tar.gz \ + && cd bison-3.7.3 \ + && ./configure --prefix=/nmodlwheel/bison \ + && make -j 3 install \ + && cd .. \ + && rm -rf bison-3.7.3.tar.gz bison-3.7.3 + +set +xe