Skip to content

update and fix after cherry-picks #204

update and fix after cherry-picks

update and fix after cherry-picks #204

Workflow file for this run

name: "C/C++ CI"
on: [push]
jobs:
Monterey:
name: MacOS X Monterey
runs-on: macos-12
timeout-minutes: 120
steps:
- name: install dependencies
run: |
brew --version
brew cleanup
brew install coreutils
brew install zlib
brew install libtool
brew install automake
brew install pkg-config
brew install pkgconfig
brew install eigen
export BUILD_ROOT=$(pwd);
- name: Checkout
uses: actions/checkout@v4
- name: CMake
run: |
cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" .
- name: make
run: cmake --build . -- -j$(nproc)
- name: package
run: cmake --build . -- package
- name: Install
run: sudo make install
- name: Tests
run: |
nelson-cli -f $GITHUB_WORKSPACE/tests/tests.m
BigSur:
name: MacOS X BigSur
runs-on: macos-11
timeout-minutes: 120
needs: Monterey
steps:
- name: install dependencies
run: |
brew --version
brew cleanup
brew install coreutils
brew install zlib
brew install libtool
brew install automake
brew install libffi
brew install pkg-config
brew install pkgconfig
brew upgrade cmake
brew install eigen
export BUILD_ROOT=$(pwd);
- name: Checkout
uses: actions/checkout@v4
- name: CMake
run: |
cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" .
- name: make
run: cmake --build . -- -j $(nproc)
- name: package
run: cmake --build . -- package
- name: Install
run: sudo make install
- name: Tests
run: |
nelson-cli -f $GITHUB_WORKSPACE/tests/tests.m
Jammy:
name: Ubuntu-22.04 Jammy
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: install dependencies
run: |
sudo apt-mark hold grub-efi-amd64-signed
sudo apt-get update --fix-missing
sudo apt upgrade;
sudo apt -y install build-essential;
sudo apt -y install apt-transport-https ca-certificates gnupg software-properties-common wget ;
sudo apt -y install ninja-build;
sudo apt -y install autotools-dev;
sudo apt -y install libtool;
sudo apt -y install automake;
sudo apt -y install pkg-config;
sudo apt -y install libeigen3-dev;
- name: Checkout
uses: actions/checkout@v4
- name: CMake
run: cmake -DCMAKE_BUILD_TYPE=Release -G "Ninja" .
- name: make with Ninja
run: cmake --build . -- -j $(nproc)
- name: package
run: cmake --build . -- package
- name: Install
run: sudo ninja install
- name: Tests
run: |
nelson-cli -f $GITHUB_WORKSPACE/tests/tests.m
Focal:
name: Ubuntu-20.04 (static)
runs-on: ubuntu-20.04
timeout-minutes: 120
needs: Jammy
steps:
- name: install dependencies
run: |
sudo apt update;
sudo apt -y install apt-transport-https ca-certificates gnupg software-properties-common wget ;
sudo apt -y autoremove cmake-data;
sudo apt -y remove --purge --auto-remove cmake;
sudo rm -rf /usr/local/bin/cmake
version=3.16
build=2
mkdir ~/temp
cd ~/temp
wget https://cmake.org/files/v$version/cmake-$version.$build-Linux-x86_64.sh
sudo mkdir /opt/cmake
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
sudo ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
cmake --version
sudo apt -y install ninja-build;
sudo apt -y install autotools-dev;
sudo apt -y install libtool;
sudo apt -y install automake;
sudo apt -y install pkg-config;
git clone https://gitlab.com/libeigen/eigen.git /tmp/eigen;
mkdir /tmp/eigen-build;
cd /tmp/eigen;
git checkout 3.4;
cd -;
cd /tmp/eigen-build;
cmake . /tmp/eigen;
make -j4;
sudo make install;
- name: Checkout
uses: actions/checkout@v4
- name: CMake
run: cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -G "Ninja" .
- name: make with Ninja
run: cmake --build . -- -j $(nproc)
- name: package
run: cmake --build . -- package
- name: Install
run: sudo ninja install
- name: Tests
run: |
nelson-cli -f $GITHUB_WORKSPACE/tests/tests.m
ArchLinux:
runs-on: ubuntu-latest
container: archlinux:latest
timeout-minutes: 120
needs: Jammy
steps:
- name: Trust repo directory
run: |
pacman -Sy --noconfirm
pacman -S git --noconfirm
git config --global --add safe.directory /__w/nelson/nelson
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
pacman -Syu --noconfirm
pacman -S base-devel --noconfirm
pacman -S git --noconfirm
pacman -S gcc binutils glibc --noconfirm
pacman -S inetutils --noconfirm
pacman -S gawk --noconfirm
pacman -S m4 --noconfirm
pacman -S pkg-config --noconfirm
pacman -S cmake --noconfirm
pacman -S make --noconfirm
git clone https://gitlab.com/libeigen/eigen.git /tmp/eigen
mkdir /tmp/eigen-build && cd /tmp/eigen && git checkout 3.4 && cd - && cd /tmp/eigen-build && cmake . /tmp/eigen && make -j4 && make install;
- name: Trust repo directory
run: git config --global --add safe.directory /__w/nelson/nelson
- name: Checkout repository
uses: actions/checkout@v4
- name: CMake
run: cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" .
- name: Make
run: cmake --build . -- -j $(nproc)
- name: package
run: cmake --build . -- package
- name: Install
run: sudo make install
- name: Tests
run: |
nelson-cli -f $GITHUB_WORKSPACE/tests/tests.m
Fedora:
runs-on: ubuntu-latest
container: fedora:39
timeout-minutes: 120
needs: Jammy
steps:
- name: Install dependencies
run: |
dnf update -y
dnf upgrade -y
dnf install -y which
dnf install -y hostname
dnf install -y git
dnf install -y make
dnf install -y libtool
dnf install -y gcc
dnf install -y gcc-c++
dnf install -y autoconf
dnf install -y automake
dnf install -y pkg-config
dnf install -y cmake
dnf install -y eigen3-devel
- name: Checkout repository
uses: actions/checkout@v4
- name: CMake
run: |
cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" .
- name: Make
run: |
cmake --build . -- -j $(nproc)
- name: package
run: cmake --build . -- package
- name: Install
run: sudo make install
- name: Tests
run: |
nelson-cli -f $GITHUB_WORKSPACE/tests/tests.m
Windows_win32:
name: Windows 32 bits
runs-on: windows-2022
defaults:
run:
shell: cmd
timeout-minutes: 120
needs: Windows_win64
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1.3
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
cd ..
git clone https://github.com/nelson-lang/nelson-thirdparty-win32.git
cd nelson-thirdparty-win32
- name: Build nelson-minimalist-core
run: |
SET PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\current\Bin\;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
cd nelson-minimalist-core
msbuild nelson-minimalist-core.sln /p:Configuration=Release /p:Platform=win32 /target:"NelSon-cli" /m:1 /p:PreferredToolArchitecture=x64
- name: Tests
run: |
.\bin\win32\nelson-cli -f .\tests\tests.m
Windows_win64:
name: Windows 64 bits
runs-on: windows-2022
defaults:
run:
shell: cmd
timeout-minutes: 120
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1.3
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
cd ..
git clone https://github.com/nelson-lang/nelson-thirdparty-x64.git
- name: Build nelson-minimalist-core
run: |
SET PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\current\Bin\;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cd nelson-minimalist-core
msbuild nelson-minimalist-core.sln /p:Configuration=Release /p:Platform=x64 /target:"NelSon-cli" /m:1 /p:PreferredToolArchitecture=x64
- name: Tests
run: |
.\bin\x64\nelson-cli -f .\tests\tests.m
Windows_win64_cmake:
name: Windows 64 bits (cmake)
runs-on: windows-2022
defaults:
run:
shell: cmd
timeout-minutes: 120
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1.3
- name: Checkout
uses: actions/checkout@v4
- name: Install eigen dependency
run: |
cd %GITHUB_WORKSPACE%
git clone https://gitlab.com/libeigen/eigen.git
cd eigen
git checkout 3.4
- name: CMake
run: |
set Eigen3_DIR=%GITHUB_WORKSPACE%/eigen
set EIGEN3_INCLUDE_DIR=%GITHUB_WORKSPACE%/eigen
SET PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\current\Bin\;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
mkdir install
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=../install ..
- name: Build
run: |
SET PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\current\Bin\;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cd build
nmake install
- name: Tests
run: |
cd install/bin
nelson -f $GITHUB_WORKSPACE/tests/tests.m
- uses: actions/upload-artifact@v1
with:
name: nelson-lite-github-action-artifacts-windows-amd64-${{ github.run_number }}
path: install/