Added *.deb builds and uploads in build CI workflow pipeline. #3
This file contains hidden or 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: Build CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.21.2' | |
| - name: Install Qrepo | |
| run: sh -c "$(curl -fsSL https://raw.githubusercontent.com/nthnn/Qrepo/master/support/install.sh)" | |
| - name: Build Basic Example | |
| run: | | |
| mkdir -p dist | |
| g++ \ | |
| -Wall -pedantic -Wdisabled-optimization -pedantic-errors -Wextra \ | |
| -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion \ | |
| -Werror -Wno-deprecated-declarations -Wfloat-equal -Wformat -Wformat=2 \ | |
| -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self \ | |
| -Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-braces \ | |
| -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs \ | |
| -Weffc++ -Wpacked -Wparentheses -Wpointer-arith -Wredundant-decls \ | |
| -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector \ | |
| -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wswitch-enum \ | |
| -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused \ | |
| -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value \ | |
| -Wunused-variable -Wvariadic-macros -O2 -Wvolatile-register-var -Wwrite-strings \ | |
| -pipe -ffast-math -s -std=c++23 -fopenmp -mabm -madx -maes -mavx -mavx2 \ | |
| -mclflushopt -mcx16 -mf16c -mfma -mfsgsbase -mfxsr -mmmx -mmovbe -mrdrnd \ | |
| -mrdseed -msgx -msse -msse2 -msse4.1 -msse4.2 -mxsave -mxsavec -mxsaveopt \ | |
| -mxsave -mfpmath=sse -march=native -s -Iinclude -o dist/basic_example \ | |
| src/chisei/*.cpp examples/basic_example.cpp | |
| - name: Run Basic Example | |
| run: | | |
| ./dist/basic_example | |
| - name: Build MNIST Example | |
| run: | | |
| mkdir -p dist | |
| g++ \ | |
| -Wall -pedantic -Wdisabled-optimization -pedantic-errors -Wextra \ | |
| -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion \ | |
| -Werror -Wno-deprecated-declarations -Wfloat-equal -Wformat -Wformat=2 \ | |
| -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self \ | |
| -Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-braces \ | |
| -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs \ | |
| -Weffc++ -Wpacked -Wparentheses -Wpointer-arith -Wredundant-decls \ | |
| -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector \ | |
| -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wswitch-enum \ | |
| -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused \ | |
| -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value \ | |
| -Wunused-variable -Wvariadic-macros -O2 -Wvolatile-register-var -Wwrite-strings \ | |
| -pipe -ffast-math -s -std=c++23 -fopenmp -mabm -madx -maes -mavx -mavx2 \ | |
| -mclflushopt -mcx16 -mf16c -mfma -mfsgsbase -mfxsr -mmmx -mmovbe -mrdrnd \ | |
| -mrdseed -msgx -msse -msse2 -msse4.1 -msse4.2 -mxsave -mxsavec -mxsaveopt \ | |
| -mxsave -mfpmath=sse -march=native -s -Iinclude -o dist/mnist_example \ | |
| src/chisei/*.cpp examples/mnist_example.cpp | |
| - name: Run MNIST Example | |
| run: | | |
| ./dist/mnist_example | |
| - name: Build *.deb files | |
| run: | | |
| chmod +x tools/build.sh | |
| qrepo run build | |
| - name: Upload dist folder | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: deb-files | |
| path: dist/ | |
| retention-days: 1 |