diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0b621c4c..19d876797 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,14 +29,9 @@ jobs: sudo apt-get update sudo apt-get install \ ccache \ - libgtk2.0-0 \ - libncursesw5 \ - libsdl-image1.2-dev \ - libsdl-ttf2.0-dev \ - libsdl1.2-dev \ + libsdl2-dev \ libxml-libxml-perl \ libxml-libxslt-perl \ - lua5.3 \ ninja-build \ zlib1g-dev pip install 'sphinx<4.4.0' @@ -44,7 +39,7 @@ jobs: run: | sudo apt-get install gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} - name: Clone DFHack - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: fetch-depth: 0 # unlimited - we need past tags submodules: true @@ -177,7 +172,7 @@ jobs: run: | pip install 'sphinx' - name: Clone DFHack - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: submodules: true - name: Build docs @@ -196,7 +191,7 @@ jobs: sudo apt-get update sudo apt-get install lua5.3 - name: Clone DFHack - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: submodules: true # don't need tags here diff --git a/.github/workflows/steam.yml b/.github/workflows/steam.yml index a67a87b81..f5e1b976a 100644 --- a/.github/workflows/steam.yml +++ b/.github/workflows/steam.yml @@ -23,10 +23,23 @@ jobs: name: Deploy to Steam runs-on: ubuntu-22.04 steps: + - name: Set up Python 3 + uses: actions/setup-python@v4 + with: + python-version: 3 - name: Install dependencies run: | sudo apt-get update - sudo apt-get install ccache + sudo apt-get install \ + ccache \ + libsdl2-dev \ + libxml-libxml-perl \ + libxml-libxslt-perl \ + ninja-build \ + zlib1g-dev \ + gcc \ + g++ + pip install 'sphinx<4.4.0' - name: Clone DFHack uses: actions/checkout@v3 with: @@ -40,13 +53,43 @@ jobs: ref: main ssh-key: ${{ secrets.DFHACK_3RDPARTY_TOKEN }} path: depends/steam - - name: Fetch ccache + - name: Fetch linux64 ccache + uses: actions/cache@v3 + with: + path: ~/.ccache + key: ccache-ubuntu-22.04-gcc-10-${{ github.sha }} + restore-keys: | + ccache-ubuntu-22.04-gcc-10 + - name: Fetch win64 ccache uses: actions/cache@v3 with: path: build/win64-cross/ccache key: ccache-win64-cross-msvc-${{ github.sha }} restore-keys: | ccache-win64-cross-msvc + - name: Set up environment + id: env_setup + run: | + echo "CCACHE_DIR=${HOME}/.ccache" >> $GITHUB_ENV + - name: Configure DFHack + run: | + cmake \ + -S . \ + -B build \ + -G Ninja \ + -DDFHACK_BUILD_ARCH=64 \ + -DBUILD_STONESENSE:BOOL=1 \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DBUILD_DFLAUNCH:BOOL=1 \ + -DBUILD_DOCS:BOOL=1 \ + -DCMAKE_INSTALL_PREFIX=linux64/output + - name: Build DFHack + run: | + ninja -C build install + ccache --max-size 50M + ccache --cleanup + ccache --show-stats - name: Cross-compile win64 artifacts env: CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1' @@ -72,4 +115,5 @@ jobs: buildDescription: ${{ github.event.inputs.version }} rootPath: build depot1Path: win64-cross/output + depot2Path: linux64/output releaseBranch: ${{ github.event.inputs.release_channel }}