diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 65fe742..133407f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,7 +18,24 @@ jobs: steps: - name: Download apt packages run: | - sudo apt-get update -y && sudo apt-get install -y bison libsfml-dev libcsfml-dev libasound2-dev + sudo apt-get update -y + sudo apt-get install -y libpthread-stubs0-dev libgl1-mesa-dev libx11-dev libx11-xcb-dev libxcb-image0-dev libxrandr-dev libxcb-randr0-dev libudev-dev libfreetype6-dev libglew-dev libjpeg8-dev libgpgme11-dev libsndfile1-dev libopenal-dev libjpeg62 libxcursor-dev cmake libclang-dev clang libasound2-dev libcsfml-dev bison + - name: Set up SFML + run: | + set -e + mkdir sfml_install + # TODO: Maybe investigate why the certificate checks for the SFML sources fail + wget https://www.sfml-dev.org/files/SFML-2.6.0-sources.zip --no-check-certificate + unzip -q SFML-2.6.0-sources.zip + pushd SFML-2.6.0 && mkdir build && cd build && cmake .. && make + make DESTDIR=$GITHUB_WORKSPACE/sfml_install install + popd + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + target: x86_64-unknown-linux-gnu - name: Install cargo-tarpaulin uses: actions-rs/install@v0.1 with: @@ -38,6 +55,12 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Build run: cargo build --verbose + env: + SFML_INCLUDE_DIR: ${{ GITHUB_WORKSPACE }}/sfml_install/usr/local/include + SFML_LIBS_DIR: ${{ GITHUB_WORKSPACE}}/sfml_install/usr/local/lib - name: Run tests run: sh ./.github/install_and_run_tests.sh + env: + SFML_INCLUDE_DIR: ${{ GITHUB_WORKSPACE }}/sfml_install/usr/local/include + SFML_LIBS_DIR: ${{ GITHUB_WORKSPACE}}/sfml_install/usr/local/lib - uses: codecov/codecov-action@v1.0.11