name: Build DataWorks on: workflow_dispatch: # schedule: # - cron: "0 */6 * * *" jobs: build-amiga: name: "Build for Amiga" runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: sudo apt-get install zip byacc flex doxygen graphviz lhasa - name: Get VBCC run: wget http://phoenix.owl.de/tags/vbcc0_9hP2.tar.gz - name: Get VASM run: git clone https://github.com/kusma/vasm - name: Get VLINK run: git clone https://github.com/kusma/vlink - name: Get targets and stuff run: wget http://phoenix.owl.de/vbcc/2022-03-23/vbcc_target_m68k-kick13.lha - name: Get configs run: wget http://phoenix.owl.de/vbcc/2022-03-23/vbcc_unix_config.tar.gz - name: Make directories for VBCC/VASM/VLINK run: sudo mkdir -p /usr/vtool/bin && sudo mkdir -p /usr/vtool/config && sudo mkdir -p /usr/vtool/targets - name: Extract run: lha x vbcc_target_m68k-kick13.lha && tar xvf vbcc0_9hP2.tar.gz && sudo tar xvf vbcc_unix_config.tar.gz -C /usr/vtool - name: Build VBCC run: yes "" | make TARGET=m68k working-directory: ./vbcc - name: Build VASM run: make CPU=m68k SYNTAX=mot -j3 working-directory: ./vasm - name: Build VLINK run: make -j3 working-directory: ./vlink - name: Copy files run: sudo cp vbcc/bin/* /usr/vtool/bin/ && sudo cp vasm/vobjdump /usr/vtool/bin/ && sudo cp vasm/vasmm68k_mot /usr/vtool/bin/ && sudo cp vlink/vlink /usr/vtool/bin/ && sudo cp -rf vbcc_target_m68k-kick13/targets/m68k-kick13 /usr/vtool/targets/ - name: Change permissions run: sudo chmod -R 777 /usr/vtool - name: Add PATH run: echo "/usr/vtool/bin" >> $GITHUB_PATH - name: Add VBCC env run: echo "VBCC=/usr/vtool" >> $GITHUB_ENV - name: Make sure it is clean run: make clean PLATFORM=amigaos - name: Make for Amiga run: make YACC=byacc -j3 PLATFORM=amigaos archive - name: Rename to -amiga run: mv dataworks.zip dataworks-amiga.zip && mv dataworks.tar.gz dataworks-amiga.tar.gz && mv Client/dataworks dataworks-amiga - name: Create artifact run: zip -rv build-amiga.zip dataworks-amiga.tar.gz dataworks-amiga.zip dataworks-amiga - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-amiga path: build-amiga.zip build-linux64: name: "Build for Linux 64-bit" runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: sudo apt-get install zip byacc flex doxygen graphviz - name: Make sure it is clean run: make clean - name: Make for Linux 64-bit run: make YACC=byacc -j3 archive - name: Rename to -linux64 run: mv dataworks.zip dataworks-linux64.zip && mv dataworks.tar.gz dataworks-linux64.tar.gz && mv Client/dataworks dataworks-linux64 && mv Server/dataworks_server dataworks-server-linux64 && mv RemoteClient/dataworks_remote_client dataworks-remote-client-linux64 - name: Create artifact run: zip -rv build-linux64.zip dataworks-linux64.tar.gz dataworks-linux64.zip dataworks-server-linux64 dataworks-linux64 dataworks-remote-client-linux64 - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-linux64 path: build-linux64.zip build-win64: name: "Build for Windows 64-bit" runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: sudo apt-get install zip byacc flex doxygen graphviz mingw-w64 nsis - name: Make sure it is clean run: make clean PLATFORM=win64 - name: Make for Windows 64-bit run: make YACC=byacc PLATFORM=win64 -j3 archive - name: Make installer run: make YACC=byacc PLATFORM=win32 install.exe && mv install.exe install-win64.exe - name: Rename to -win64 run: mv dataworks.zip dataworks-win64.zip && mv dataworks.tar.gz dataworks-win64.tar.gz && mv Client/dataworks.exe dataworks-win64.exe && mv Server/dataworks_server.exe dataworks-server-win64.exe && mv RemoteClient/dataworks_remote_client.exe dataworks-remote-client-win64.exe - name: Create artifact run: zip -rv build-win64.zip dataworks-win64.tar.gz dataworks-win64.zip dataworks-server-win64.exe dataworks-win64.exe dataworks-remote-client-win64.exe install-win64.exe - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-win64 path: build-win64.zip build-win32: name: "Build for Windows 32-bit" runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: sudo apt-get install zip byacc flex doxygen graphviz mingw-w64 nsis - name: Make sure it is clean run: make clean PLATFORM=win32 - name: Make for Windows 32-bit run: make YACC=byacc PLATFORM=win32 -j3 archive - name: Make installer run: make YACC=byacc PLATFORM=win32 install.exe && mv install.exe install-win32.exe - name: Rename to -win32 run: mv dataworks.zip dataworks-win32.zip && mv dataworks.tar.gz dataworks-win32.tar.gz && mv Client/dataworks.exe dataworks-win32.exe && mv Server/dataworks_server.exe dataworks-server-win32.exe && mv RemoteClient/dataworks_remote_client.exe dataworks-remote-client-win32.exe - name: Create artifact run: zip -rv build-win32.zip dataworks-win32.tar.gz dataworks-win32.zip dataworks-server-win32.exe dataworks-win32.exe dataworks-remote-client-win32.exe install-win32.exe - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-win32 path: build-win32.zip build-dos4g: name: "Build for DOS/4G" runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: sudo apt-get install zip byacc flex doxygen graphviz - name: Create /usr/watcom run: sudo mkdir -p /usr/watcom - name: Install Open Watcom run: curl -L https://github.com/open-watcom/open-watcom-v2/releases/download/Last-CI-build/ow-snapshot.tar.xz | sudo tar xvJf - -C /usr/watcom - name: Add PATH run: echo "/usr/watcom/binl64" >> $GITHUB_PATH - name: Add WATCOM env run: echo "WATCOM=/usr/watcom" >> $GITHUB_ENV - name: Add INCLUDE env run: echo "INCLUDE=/usr/watcom/h" >> $GITHUB_ENV - name: Make sure it is clean run: make clean PLATFORM=dos4g - name: Make for DOS/4G run: make YACC=byacc PLATFORM=dos4g -j3 archive - name: Rename to -dos4g run: mv dataworks.zip dataworks-dos4g.zip && mv dataworks.tar.gz dataworks-dos4g.tar.gz && mv Client/dataworks.exe dataworks-dos4g.exe && mv Server/dataworks_server.exe dataworks-server-dos4g.exe && mv RemoteClient/dataworks_remote_client.exe dataworks-remote-client-dos4g.exe - name: Create artifact run: zip -rv build-dos4g.zip dataworks-dos4g.tar.gz dataworks-dos4g.zip dataworks-server-dos4g.exe dataworks-dos4g.exe dataworks-remote-client-dos4g.exe - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-dos4g path: build-dos4g.zip build-mac: name: "Build for MacOS" runs-on: macos-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: brew install flex byacc make doxygen graphviz - name: Make run: make -j3 YACC=byacc archive - name: Rename run: mv dataworks.tar.gz dataworks-macos-arm64.tar.gz && mv dataworks.zip dataworks-macos-arm64.zip && mv Client/dataworks dataworks-macos-arm64 && mv Server/dataworks_server dataworks-server-macos-arm64 && mv RemoteClient/dataworks_remote_client dataworks-remote-client-macos-arm64 - name: Create artifact run: zip -rv build-macos.zip dataworks-*.tar.gz dataworks-*.zip dataworks-server-macos-arm64 dataworks-macos-arm64 dataworks-remote-client-macos-arm64 - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-macos path: build-macos.zip build-debpkg: name: "Build .deb" runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: sudo apt install flex byacc make graphviz - name: Make run: make YACC=byacc ./Package/dataworks.deb DEB_ARCH=amd64 - name: Rename run: mv Package/dataworks.deb dataworks.deb - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-debpkg path: dataworks.deb build-dosimg: name: "Build DOS floppy images" runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: sudo apt install flex byacc make graphviz mtools xvfb dosbox - name: Create /usr/watcom run: sudo mkdir -p /usr/watcom - name: Install Open Watcom run: curl -L https://github.com/open-watcom/open-watcom-v2/releases/download/Last-CI-build/ow-snapshot.tar.xz | sudo tar xvJf - -C /usr/watcom - name: Add PATH run: echo "/usr/watcom/binl64" >> $GITHUB_PATH - name: Add WATCOM env run: echo "WATCOM=/usr/watcom" >> $GITHUB_ENV - name: Add INCLUDE env run: echo "INCLUDE=/usr/watcom/h" >> $GITHUB_ENV - name: Make run: xvfb-run make YACC=byacc dos-installer FLOPPY_SIZE=1440 - name: Rename run: mv install.img install1440.img - name: Make run: xvfb-run make YACC=byacc dos-installer FLOPPY_SIZE=1200 - name: Rename run: mv install.img install1200.img - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-dosimg1200 path: install1200.img - name: Upload artifact uses: actions/upload-artifact@v4 with: name: build-dosimg1440 path: install1440.img test: name: "Test" runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: sudo apt install flex byacc make graphviz - name: Make run: make YACC=byacc test release: name: "Release" runs-on: ubuntu-latest permissions: contents: write needs: [build-dos4g, build-amiga, build-win32, build-win64, build-linux64, build-mac, build-debpkg, build-dosimg, test] steps: - name: Checkout uses: actions/checkout@v4 - name: Download from build-dos4g uses: actions/download-artifact@v4 with: name: build-dos4g - name: Download from build-win32 uses: actions/download-artifact@v4 with: name: build-win32 - name: Download from build-win64 uses: actions/download-artifact@v4 with: name: build-win64 - name: Download from build-linux64 uses: actions/download-artifact@v4 with: name: build-linux64 - name: Download from build-amiga uses: actions/download-artifact@v4 with: name: build-amiga - name: Download from build-macos uses: actions/download-artifact@v4 with: name: build-macos - name: Download from build-debpkg uses: actions/download-artifact@v4 with: name: build-debpkg - name: Download from build-dosimg1200 uses: actions/download-artifact@v4 with: name: build-dosimg1200 - name: Download from build-dosimg1440 uses: actions/download-artifact@v4 with: name: build-dosimg1440 - name: Extract the build-dos4g run: unzip $GITHUB_WORKSPACE/build-dos4g.zip - name: Extract the build-win32 run: unzip $GITHUB_WORKSPACE/build-win32.zip - name: Extract the build-win64 run: unzip $GITHUB_WORKSPACE/build-win64.zip - name: Extract the build-linux64 run: unzip $GITHUB_WORKSPACE/build-linux64.zip - name: Extract the build-amiga run: unzip $GITHUB_WORKSPACE/build-amiga.zip - name: Extract the build-macos run: unzip $GITHUB_WORKSPACE/build-macos.zip - name: Rename dataworks.deb run: mv dataworks.deb dataworks-amd64-ubuntu.deb - name: Delete old release run: gh release delete "$(make get-version)" --cleanup-tag -y || true env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Release run: gh release create -t "v$(make get-version)" "$(make get-version)" dataworks-macos-arm64.{tar.gz,zip} dataworks-dos4g.{tar.gz,zip} dataworks-win32.{tar.gz,zip} dataworks-win64.{tar.gz,zip} dataworks-linux64.{tar.gz,zip} dataworks-amiga.{tar.gz,zip} install1200.img install1440.img dataworks-amd64-ubuntu.deb install-win{32,64}.exe -n "Version \`$(make get-version)\` was built in this release" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}