diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml new file mode 100644 index 0000000000..dce5d85f28 --- /dev/null +++ b/.github/workflows/build_viewer.yml @@ -0,0 +1,77 @@ +name: Build viewer +on: push +env: + AUTOBUILD_VARIABLES_FILE: ${{github.workspace}}/build-variables/variables + EXTRA_ARGS: -DFMODSTUDIO=Off -DUSE_KDU=Off +jobs: + build_matrix: + strategy: + matrix: + os: [macos-11,ubuntu-18.04,windows-2022] + grid: [sl,os] + addrsize: [64,32] + exclude: + - os: ubuntu-18.04 + addrsize: 32 + - os: macos-11 + addrsize: 32 + runs-on: ${{ matrix.os }} + steps: + - name: Set OS flag + if: matrix.grid == 'os' + run: echo "FS_GRID=-DOPENSIM:BOOL=ON" >> $GITHUB_ENV + shell: bash + + - name: Set SL flag + if: matrix.grid == 'sl' + run: echo "FS_GRID=-DOPENSIM:BOOL=OFF" >> $GITHUB_ENV + shell: bash + + - name: Get the code + uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Checkout build var + uses: actions/checkout@v3 + with: + repository: FirestormViewer/fs-build-variables + path: build-variables + + - name: Install required Ubuntu packages + if: runner.os == 'Linux' + run: sudo apt-get install python3-setuptools mesa-common-dev libgl1-mesa-dev libxinerama-dev libxrandr-dev libpulse-dev libglu1-mesa-dev + + - name: install autobuild + run: pip3 install git+https://github.com/Nicky-D/autobuild@main_nd + + - name: Configure + run: autobuild configure -c ReleaseFS -A${{matrix.addrsize}} -- --package --chan ${{github.ref_name}} ${{env.EXTRA_ARGS}} ${{env.FS_GRID}} + shell: bash + + - name: build + run: autobuild build -c ReleaseFS -A${{matrix.addrsize}} --no-configure + shell: bash + + - name: publish ${{ matrix.os }} artifacts + if: runner.os == 'Windows' + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip + path: | + build-vc150-*/newview/Release/*Setup.exe + build-vc150-*/newview/Release/*.xz + + - name: publish ${{ matrix.os }} artifacts + if: runner.os == 'Linux' + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip + path: build-linux-*/newview/*.xz + + - name: publish ${{ matrix.os }} artifacts + if: runner.os == 'macOS' + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip + path: build-darwin-*/newview/*.dmg