diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc66f17..561efbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,11 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive + - name: Set up ccache + uses: actions/cache@v2 + with: + path: ~/.cache + key: ccache-linux-arm64 - name: Set up dependencies run: | sudo dpkg --add-architecture arm64 @@ -28,6 +33,11 @@ jobs: echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list sudo apt-get update -qq sudo apt-get install -yqq g++-aarch64-linux-gnu libgl1-mesa-dev:arm64 liblo-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static + - name: Install ccache + run: | + sudo apt-get install -yqq ccache + ccache --set-config=cache_dir=~/.cache + ccache --set-config=compression=true - name: Build linux arm64 cross-compiled env: CC: aarch64-linux-gnu-gcc @@ -35,6 +45,7 @@ jobs: LDFLAGS: -static-libgcc -static-libstdc++ PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig run: | + export PATH="/usr/lib/ccache:${PATH}" make features make WITH_LTO=true -j $(nproc) - name: Set sha8 @@ -55,6 +66,11 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive + - name: Set up ccache + uses: actions/cache@v2 + with: + path: ~/.cache + key: ccache-linux-armhf - name: Set up dependencies run: | sudo dpkg --add-architecture armhf @@ -64,6 +80,11 @@ jobs: echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq sudo apt-get install -yqq g++-arm-linux-gnueabihf libgl1-mesa-dev:armhf liblo-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static + - name: Install ccache + run: | + sudo apt-get install -yqq ccache + ccache --set-config=cache_dir=~/.cache + ccache --set-config=compression=true - name: Build linux armhf cross-compiled env: CC: arm-linux-gnueabihf-gcc @@ -71,7 +92,7 @@ jobs: LDFLAGS: -static-libgcc -static-libstdc++ PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:${PATH}" + export PATH="/usr/lib/ccache:${PATH}" make features make WITH_LTO=true -j $(nproc) - name: Set sha8 @@ -92,11 +113,21 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive + - name: Set up ccache + uses: actions/cache@v2 + with: + path: ~/.cache + key: ccache-linux-x86 - name: Set up dependencies run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq sudo apt-get install -yqq g++-i686-linux-gnu libgl1-mesa-dev:i386 liblo-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 + - name: Install ccache + run: | + sudo apt-get install -yqq ccache + ccache --set-config=cache_dir=~/.cache + ccache --set-config=compression=true - name: Build linux x86 env: CC: i686-linux-gnu-gcc @@ -106,6 +137,7 @@ jobs: LDFLAGS: -m32 -static-libgcc -static-libstdc++ PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig run: | + export PATH="/usr/lib/ccache:${PATH}" make features make WITH_LTO=true -j $(nproc) - name: Set sha8 @@ -127,18 +159,24 @@ jobs: with: submodules: recursive - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 + uses: actions/cache@v2 with: - key: linux-x86_64 + path: ~/.cache + key: ccache-linux-x86_64 - name: Set up dependencies run: | sudo apt-get update -qq sudo apt-get install -yqq libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + - name: Install ccache + run: | + sudo apt-get install -yqq ccache + ccache --set-config=cache_dir=~/.cache + ccache --set-config=compression=true - name: Build linux x86_64 env: LDFLAGS: -static-libgcc -static-libstdc++ run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:${PATH}" + export PATH="/usr/lib/ccache:${PATH}" make features make WITH_LTO=true -j $(nproc) - name: Set sha8 @@ -217,21 +255,27 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive + - name: Set up ccache + uses: actions/cache@v2 + with: + path: ~/.cache + key: ccache-win32 + - name: Install ccache + run: | + brew install ccache + ccache --set-config=cache_dir=~/.cache + ccache --set-config=compression=true - name: Fix up Xcode run: | + export PATH="/usr/local/opt/ccache/libexec:${PATH}" sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* sudo xcode-select -s "/Applications/Xcode_12.3.app" - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: macOS-universal - name: Build macOS universal env: CFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2 CXXFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2 LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.12 run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:${PATH}" make features make NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu) ./dpf/utils/package-osx-bundles.sh @@ -250,12 +294,22 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive + - name: Set up ccache + uses: actions/cache@v2 + with: + path: ~/.cache + key: ccache-win32 - name: Set up dependencies run: | sudo add-apt-repository -y ppa:cybermax-dexter/mingw-w64-backport sudo dpkg --add-architecture i386 sudo apt-get update -qq sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 + - name: Install ccache + run: | + sudo apt-get install -yqq ccache + ccache --set-config=cache_dir=~/.cache + ccache --set-config=compression=true - name: Build win32 cross-compiled env: CC: i686-w64-mingw32-gcc @@ -266,6 +320,7 @@ jobs: WINEDEBUG: "-all" WINEDLLOVERRIDES: "mscoree,mshtml=" run: | + export PATH="/usr/lib/ccache:${PATH}" make features make WITH_LTO=true -j $(nproc) - name: Set sha8 @@ -286,10 +341,20 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive + - name: Set up ccache + uses: actions/cache@v2 + with: + path: ~/.cache + key: ccache-win64 - name: Set up dependencies run: | sudo apt-get update -qq sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable + - name: Install ccache + run: | + sudo apt-get install -yqq ccache + ccache --set-config=cache_dir=~/.cache + ccache --set-config=compression=true - name: Build win64 cross-compiled env: CC: x86_64-w64-mingw32-gcc @@ -300,6 +365,7 @@ jobs: WINEDEBUG: "-all" WINEDLLOVERRIDES: "mscoree,mshtml=" run: | + export PATH="/usr/lib/ccache:${PATH}" make features make WITH_LTO=true -j $(nproc) - name: Set sha8