name: build on: [workflow_dispatch] jobs: windows-msys: name: ${{ matrix.config }} Windows ${{ matrix.arch }} runs-on: windows-2022 strategy: fail-fast: false matrix: arch: [x86_64] cc: [gcc] include: # - arch: x86 # msystem: MINGW32 # prefix: mingw-w64-i686 - arch: x86_64 msystem: MINGW64 prefix: mingw-w64-x86_64 defaults: run: shell: msys2 {0} steps: - uses: msys2/setup-msys2@v2 with: install: base-devel ${{ matrix.prefix }}-toolchain ${{ matrix.prefix }}-qt5-base ${{ matrix.prefix }}-qt5-svg ${{ matrix.prefix }}-libxml2 git unzip p7zip msystem: ${{ matrix.msystem }} path-type: minimal release: false update: false - uses: actions/checkout@v4 with: submodules: recursive - name: Build run: | make MAKEFILE_CONF=msys2-Makefile.conf -j4 mkdir -p install/settings 7z a Windows-${{ matrix.arch }}.zip ./install/* # zip immediately, since .bla files and empty folders get lost somewhere later otherwise - uses: actions/upload-artifact@v4 with: name: Windows-${{ matrix.arch }} path: Windows-${{ matrix.arch }}.zip if-no-files-found: error linux: name: ${{ matrix.config }} Linux ${{ matrix.arch }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: arch: [x86_64] steps: - name: Install tools run: | sudo apt-get -qq update sudo apt-get -y install mesa-common-dev qtbase5-dev libglib2.0-dev libjpeg-dev libpng-dev - uses: actions/checkout@v4 with: submodules: recursive - name: Build run: | make CC=gcc-14 CXX=g++-14 CXXFLAGS="-Wno-deprecated-copy" -j4 7z a Linux-${{ matrix.arch }}.7z ./install/* # 7z to preserve file permissions - uses: actions/upload-artifact@v4 with: name: Linux-${{ matrix.arch }} path: Linux-${{ matrix.arch }}.7z if-no-files-found: error create-testing: if: github.ref == 'refs/heads/master' && ( github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) needs: [windows-msys, linux] runs-on: ubuntu-latest steps: - name: Download Artifacts uses: actions/download-artifact@v4 - name: Create binary archives shell: bash run: | mv Windows-x86_64/Windows-x86_64.zip netradiant-custom-$(date +%Y%m%d)-windows-x86_64.zip mv Linux-x86_64/Linux-x86_64.7z netradiant-custom-$(date +%Y%m%d)-linux-x86_64.7z # note: 7z dir/* doesn't match .bla (hidden) file in linux under dir/ but matches in subfolders # or doesn't match there now too? - name: Get current date run: | echo "MY_DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV - name: Create latest build uses: Garux/action-automatic-releases@master with: repo_token: ${{ secrets.GITHUB_TOKEN }} automatic_release_tag: ${{ env.MY_DATE }} prerelease: false title: Latest Build files: | *.zip *.7z