name: build-ci on: push: branches: [ "*" ] tags: [ "*" ] paths-ignore: - "**.7z" pull_request: branches: [ main ] jobs: macos: runs-on: macos-latest env: SDL_VER: "2.0.22" FFMPEG_VER: "5.1" MACOSX_DEPLOYMENT_TARGET: "10.13" CCACHE_CPP2: "yes" CCACHE_SLOPPINESS: "time_macros" CC: "ccache clang" CXX: "ccache clang++" steps: - name: Checkout run: | git clone -b release-${SDL_VER} https://github.com/libsdl-org/SDL.git --depth 1 git clone -b n${FFMPEG_VER} https://git.ffmpeg.org/ffmpeg.git --depth 1 - name: Set up cache uses: actions/cache@v2 with: path: | ~/Library/Caches/ccache key: ${{ runner.os }}-macos-${{ github.sha }} restore-keys: | ${{ runner.os }}-macos- - name: Install dependencies run: | brew install p7zip ccache nasm - name: Build SDL run: | export PATH="/usr/local/opt/ccache/libexec:$PATH" mkdir -p SDL/build/sdl-${SDL_VER} cd SDL/build cmake ../ -DBUILD_SHARED_LIBS=1 make -j4 make install DESTDIR=$(pwd)/sdl-${SDL_VER} 7z a "sdl-${SDL_VER}.7z" sdl-${SDL_VER}/ - name: Build FFMPEG run: | export PATH="/usr/local/opt/ccache/libexec:$PATH" mkdir -p ffmpeg/build/ffmpeg-${FFMPEG_VER} cd ffmpeg/build # The included lzma is built for 10.15 can generaates linker warnings ../configure --cc="${CC}" --cxx="${CXX}" --enable-shared --disable-static --disable-doc \ --disable-lzma make -j4 make install DESTDIR=$(pwd)/ffmpeg-${FFMPEG_VER} 7z a "ffmpeg-${FFMPEG_VER}.7z" ffmpeg-${FFMPEG_VER}/ - name: Pack run: | # move the compiled archive into the artifacts directory to be uploaded mkdir artifacts mv "SDL/build/sdl-${SDL_VER}.7z" artifacts/ mv "ffmpeg/build/ffmpeg-${FFMPEG_VER}.7z" artifacts/ - name: Upload uses: actions/upload-artifact@v2 with: name: macos path: | artifacts/