name: Build on: workflow_dispatch: pull_request: branches: [ master ] schedule: - cron: '0 0 * * FRI' jobs: unit-test: timeout-minutes: 10 runs-on: ubuntu-latest env: DISPLAY: ":99" steps: - name: Clone repository uses: actions/checkout@v2 - name: Install Dependencies run: | sudo apt-get update sudo apt-get install -y gcc make libglfw3-dev libglfw3 xorg build-essential cmake xorg-dev libx11-dev libglu1-mesa-dev freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libgl1-mesa-glx libgl1-mesa-dev xvfb - name: Install GLFW uses: RpxdYTX/install-glfw-deps@v2 - name: Setup x11 run: Xvfb $DISPLAY -screen 0 1280x1024x24 & - name: Run tests run: make -C test build-unix: timeout-minutes: 10 runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest] steps: - name: Clone repository uses: actions/checkout@v2 - name: Install Dependencies run: | set -x if [ "$RUNNER_OS" == "Linux" ]; then sudo apt-get update -qq sudo apt-get install -y -qq gcc make xorg build-essential cmake xorg-dev libx11-dev libglu1-mesa-dev freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libgl1-mesa-glx libgl1-mesa-dev libglfw3-dev libglfw3 elif [ "$RUNNER_OS" == "macOS" ]; then brew update brew install glfw else echo "$RUNNER_OS not supported" exit 1 fi - name: Build run: make build-win: timeout-minutes: 20 runs-on: windows-latest steps: - name: Clone repository uses: actions/checkout@v2 - name: Install MinGW uses: egor-tensin/setup-mingw@v2 - name: Download GLFW binaries uses: carlosperate/download-file-action@v1.1.1 with: file-url: 'https://github.com/glfw/glfw/releases/download/3.3.6/glfw-3.3.6.bin.WIN64.zip' file-name: 'glfw.zip' location: '${{ github.workspace }}\lib' - name: Unpack GLFW binaries run: | unzip 'lib/glfw.zip' -d 'lib' rm 'lib\glfw.zip' mv 'lib\glfw*' 'lib\glfw' - name: Build run: make HEADERS="-I lib/glfw/include" WIN_UNIX=1