Skip to content

Update colortable.c - Addtions and changes #17

Update colortable.c - Addtions and changes

Update colortable.c - Addtions and changes #17

Workflow file for this run

name: Build Matrix
on: [push, workflow_dispatch]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
env:
BUILD_NUMBER: ${{ github.run_number }}
strategy:
fail-fast: false
matrix:
config:
- name: "Windows 64bit"
artifact: "bricksync-win64"
os: windows-latest
msystem: MINGW64
msystem_lower: mingw64
arch: x86_64
bits: 64
openssl: "-x64"
- name: "Windows 32bit"
artifact: "bricksync-win32"
os: windows-latest
msystem: MINGW32
msystem_lower: mingw32
arch: i686
bits: 32
openssl: ""
- name: "Ubuntu 18.04 64bit"
artifact: "bricksync-linux64"
os: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Compiler on Windows
if: startsWith(matrix.config.os, 'windows')
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.config.msystem }}
install: git msys2-devel base-devel binutils mingw-w64-${{ matrix.config.arch }}-toolchain zip
update: true
- name: Build on Windows
if: startsWith(matrix.config.os, 'windows')
run: |
gcc -std=gnu99 -m${{ matrix.config.bits }} cpuconf.c cpuinfo.c -O2 -s -o cpuconf.exe
./cpuconf.exe -h -ccenv
windres bricksync.rc -O coff -o bricksync.res
gcc -std=gnu99 -I./build-win${{ matrix.config.bits }}/ -L./build-win${{ matrix.config.bits }}/ -m${{ matrix.config.bits }} bricksync.c bricksyncconf.c bricksyncnet.c bricksyncinit.c bricksyncinput.c bsantidebug.c bsmessage.c bsmathpuzzle.c bsorder.c bsregister.c bsapihistory.c bstranslation.c bsevalgrade.c bsoutputxml.c bsorderdir.c bspriceguide.c bsmastermode.c bscheck.c bssync.c bsapplydiff.c bsfetchorderinv.c bsresolve.c bscatedit.c bsfetchinv.c bsfetchorderlist.c bsfetchset.c bscheckreg.c bsfetchpriceguide.c tcp.c vtlex.c cpuinfo.c antidebug.c mm.c mmhash.c mmbitmap.c cc.c ccstr.c debugtrack.c tcphttp.c oauth.c bricklink.c brickowl.c brickowlinv.c colortable.c json.c bsx.c bsxpg.c journal.c exclperm.c iolog.c crypthash.c cryptsha1.c rand.c bn512.c bn1024.c rsabn.c bricksync.res -O2 -s -fvisibility=hidden -o bricksync.exe -lm -lwsock32 -lws2_32 -lssl-1_1${{ matrix.config.openssl }} -lcrypto-1_1${{ matrix.config.openssl }}
mkdir -p bricksync-win${{ matrix.config.bits }}/data
cp bricksync.exe bricksync-win${{ matrix.config.bits }}
cp bricksync.conf.txt bricksync-win${{ matrix.config.bits }}/data
cp build-win${{ matrix.config.bits }}/libcrypto-1_1${{ matrix.config.openssl }}.dll bricksync-win${{ matrix.config.bits }}
cp build-win${{ matrix.config.bits }}/libssl-1_1${{ matrix.config.openssl }}.dll bricksync-win${{ matrix.config.bits }}
zip -ur bricksync-win${{ matrix.config.bits }}-1.7.4-${{ github.run_number }}.zip bricksync-win${{ matrix.config.bits }}
shell: msys2 {0}
## shell: cmd
## tar.exe -acvf bricksync-win${{ matrix.config.bits }}-1.7.4-${{ github.run_number }}.zip bricksync-win${{ matrix.config.bits }}
- name: Upload on Windows
uses: actions/upload-artifact@v2
if: startsWith(matrix.config.os, 'windows')
with:
name: ${{ matrix.config.artifact }}
path: "*.zip"
- name: Build on Linux
if: startsWith(matrix.config.os, 'ubuntu')
run: |
gcc -std=gnu99 -m64 cpuconf.c cpuinfo.c -O2 -s -o cpuconf
./cpuconf -h -ccenv
gcc -std=gnu99 -m64 bricksync.c bricksyncconf.c bricksyncnet.c bricksyncinit.c bricksyncinput.c bsantidebug.c bsmessage.c bsmathpuzzle.c bsorder.c bsregister.c bsapihistory.c bstranslation.c bsevalgrade.c bsoutputxml.c bsorderdir.c bspriceguide.c bsmastermode.c bscheck.c bssync.c bsapplydiff.c bsfetchorderinv.c bsresolve.c bscatedit.c bsfetchinv.c bsfetchorderlist.c bsfetchset.c bscheckreg.c bsfetchpriceguide.c tcp.c vtlex.c cpuinfo.c antidebug.c mm.c mmhash.c mmbitmap.c cc.c ccstr.c debugtrack.c tcphttp.c oauth.c bricklink.c brickowl.c brickowlinv.c colortable.c json.c bsx.c bsxpg.c journal.c exclperm.c iolog.c crypthash.c cryptsha1.c rand.c bn512.c bn1024.c rsabn.c -O2 -s -fvisibility=hidden -o bricksync -lm -lpthread -lssl -lcrypto
mkdir -p bricksync-linux64/data
cp bricksync bricksync-linux64
cp bricksync.conf.txt bricksync-linux64/data
tar -cvzf bricksync-linux64-1.7.4-${{ github.run_number}}.tar.gz bricksync-linux64
shell: bash
- name: Upload on Linux
uses: actions/upload-artifact@v2
if: startsWith(matrix.config.os, 'ubuntu')
with:
name: ${{ matrix.config.artifact }}
path: "*.tar.gz"