Skip to content

Build others

Build others #225

Workflow file for this run

name: Build others
on:
workflow_dispatch:
jobs:
build-macos-x86_64:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
repository: gatk555/ngspice
ref: gh_pm44
- name: Install Dependencies
run: |
brew install make automake bison
brew install libxaw
# compile_macos_gcc.sh expects this path. Kludge it.
sudo mkdir -p /opt/X11/include
sudo ln -s /usr/local/include/freetype2 /opt/X11/include/freetype2
- name: Build X86_64
run: |
PATH='/usr/local/opt/bison/bin:'$PATH
./compile_macos_clang.sh || true # Will fail to install
if [ ! -f release/src/ngspice ]; then false; fi
- name: Install X86_64
run: |
cd release
sudo make install
cd ..
mkdir build
for i in bin lib share ; do
mkdir -p build/$i
cp -r /usr/local/$i/ngspice build/$i/
done
echo Create README.ngspice
echo 'This binary package of ngspice was built at https://github.com/gatk555/ngspice.' > build/README.ngspice
echo 'The source code came from the pre-master-44 branch.' > build/README.ngspice
echo 'Install to /usr/local.' > build/README.ngspice
- name: Save X86_64
uses: actions/upload-artifact@v4
with:
name: Ngspice pre-master-44, Macos X86_64
path: build
- name: Clean
run: |
rm -rf release build
for i in bin lib share ; do
sudo rm -rf /usr/local/$i/ngspice
done
build-win-X64:
runs-on: windows-latest
steps:
- name: Flex and Bison
run: |
md ..\flex-bison
cd ..\flex-bison
curl.exe -L -O "https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip"
unzip win_flex_bison-2.5.25
- uses: actions/checkout@v4
with:
repository: gatk555/ngspice
ref: gh_pm44
- uses: microsoft/setup-msbuild@v2
- name: Build
shell: cmd
run: |
set config=Release
set plat=x64
set suffix=64
set opt=-property:Configuration=%config% -property:Platform=%plat%
msbuild %opt% visualc\xspice\cmpp\cmpp.vcxproj
msbuild %opt% visualc\xspice\cmpp\cmpp.vcxproj
msbuild %opt% visualc\xspice\analog.vcxproj
msbuild %opt% visualc\xspice\digital.vcxproj
msbuild %opt% visualc\xspice\spice2poly.vcxproj
msbuild %opt% visualc\xspice\table.vcxproj
msbuild %opt% visualc\xspice\xtradev.vcxproj
msbuild %opt% visualc\xspice\xtraevt.vcxproj
set cms=codemodels\%plat%\%config%
md visualc\%cms%
move visualc\xspice\%cms%\*.cm visualc\%cms%
msbuild %opt% visualc\KLU/KLU_COMPLEX.vcxproj
msbuild %opt% visualc\vngspice.vcxproj
msbuild %opt% visualc\sharedspice.vcxproj
set config=console_release
set opt=-property:Configuration=%config% -property:Platform=%plat%
msbuild %opt% visualc\vngspice.vcxproj
copy visualc\vngspice\Release.x64\ngspice.exe C:\Spice64\bin\gui.exe
md c:\Spice64\bin-dll
copy visualc\sharedspice\Release.x64\ngspice.dll c:\Spice64\bin-dll
copy visualc\sharedspice\Release.x64\ngspice.exp c:\Spice64\bin-dll
copy visualc\sharedspice\Release.x64\ngspice.lib c:\Spice64\bin-dll
c:
cd \Spice64
move bin\ngspice.exe bin\ngspice_con.exe
move bin\gui.exe bin\ngspice.exe
echo Create README.ngspice
echo This binary build of ngspice was built at https://github.com/gatk555/ngspice. > README.ngspice
echo The source code came from the pre-master-44 branch. >> README.ngspice
echo Install to C:\Spice64\. >> README.ngspice
- uses: actions/checkout@v4
with:
repository: gatk555/test
- name: Add DLL
shell: cmd
run: |
unzip libomp.zip
copy libomp140.x86_64.dll C:\Spice64\bin\vcomp140.dll
unzip windows_osdi.zip
copy *.osdi C:\Spice64\lib\ngspice
- name: Save
uses: actions/upload-artifact@v4
with:
name: Ngspice pre-master-44, Windows X86-64
path: C:\Spice64
build-win_msys:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ucrt64
update: true
install: >
base-devel
mingw-w64-ucrt-x86_64-toolchain
autotools
- name: Flex and Bison
shell: cmd
run: |
md ..\flex-bison
cd ..\flex-bison
curl.exe -L -O "https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip"
unzip win_flex_bison-2.5.25
- uses: actions/checkout@v4
with:
repository: gatk555/ngspice
ref: gh_pm44
- name: Build
run: |
./compile_min.sh
echo Create README.ngspice
echo This binary build of ngspice was built at https://github.com/gatk555/ngspice. > C:\Spice64\README.ngspice
echo The source code came from the pre-master-44 branch. >> C:\Spice64\README.ngspice
echo Install to C:\Spice64\. >> C:\Spice64\README.ngspice
- uses: actions/checkout@v4
with:
repository: gatk555/test
- name: Add DLL
shell: cmd
run: |
unzip libomp.zip
copy libomp140.x86_64.dll C:\Spice64\bin\vcomp140.dll
- name: Save
uses: actions/upload-artifact@v4
with:
name: Ngspice pre-master-44, Windows 64-bit with MSYS and UCRT64
path: C:\Spice64