Skip to content

Commit

Permalink
Install Swig 4.0.2 on Ubuntu CI from source pre-cmake
Browse files Browse the repository at this point in the history
Closes #697
  • Loading branch information
ptheywood authored and mondus committed Oct 6, 2021
1 parent 76c7d2d commit ab7c511
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/Draft-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,29 @@ jobs:
if [ "$OS" == 'ubuntu-18.04' ]; then
sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype6-dev libgl1-mesa-dev
fi
- name: Install Swig >= 4.0.2
run: |
# Remove existing swig install, so CMake finds the correct swig
if [ "$OS" == 'ubuntu-20.04' ]; then
sudo apt-get remove -y swig swig4.0
fi
# Install Ubuntu 18.04 packages
if [ "$OS" == 'ubuntu-18.04' ]; then
sudo apt-get remove -y swig
fi
# Install additional apt-based dependencies required to build swig 4.0.2
sudo apt-get install -y bison
# Create a local directory to build swig in.
mkdir -p swig-from-source && cd swig-from-source
# Install SWIG building from source dependencies
wget https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz
tar -zxf v4.0.2.tar.gz
cd swig-4.0.2/
./autogen.sh
./configure
make
sudo make install
- name: Configure cmake
run: >
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,29 @@ jobs:
sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype6-dev libgl1-mesa-dev
fi
- name: Install Swig >= 4.0.2
run: |
# Remove existing swig install, so CMake finds the correct swig
if [ "$OS" == 'ubuntu-20.04' ]; then
sudo apt-get remove -y swig swig4.0
fi
# Install Ubuntu 18.04 packages
if [ "$OS" == 'ubuntu-18.04' ]; then
sudo apt-get remove -y swig
fi
# Install additional apt-based dependencies required to build swig 4.0.2
sudo apt-get install -y bison
# Create a local directory to build swig in.
mkdir -p swig-from-source && cd swig-from-source
# Install SWIG building from source dependencies
wget https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz
tar -zxf v4.0.2.tar.gz
cd swig-4.0.2/
./autogen.sh
./configure
make
sudo make install
- name: Configure cmake
run: >
cmake . -B "${{ env.BUILD_DIR }}"
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ If you use this software in your work, please cite DOI [10.5281/zenodo.5428984](

Alternatively, [CITATION.cff](https://github.com/FLAMEGPU/FLAMEGPU2/blob/master/CITATION.cff) provides citation metadata, which can also be accessed from [GitHub](https://github.com/FLAMEGPU/FLAMEGPU2).


## License

FLAME GPU is distributed under the [MIT Licence](https://github.com/FLAMEGPU/FLAMEGPU2/blob/master/LICENSE.md).
Expand Down

0 comments on commit ab7c511

Please sign in to comment.