diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml new file mode 100644 index 00000000..fe372f45 --- /dev/null +++ b/.github/workflows/compilation.yml @@ -0,0 +1,97 @@ +name: Compilation + +on: [push] + +jobs: + + build_gcc9: + name: "GCC 9 (ubuntu-18.04)" + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - name: "Install packages" + run: sudo apt-get install g++-9 libsdl1.2-dev libsdl-net1.2-dev libsdl-sound1.2-dev + - name: Build + env: + CC: gcc-9 + CXX: g++-9 + run: | + # build steps + set -x + $CXX --version + ./autogen.sh + ./configure + make -j "$(nproc)" + + build_gcc8: + name: "GCC 8 (ubuntu-18.04)" + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - name: "Install packages" + run: sudo apt-get install g++-8 libsdl1.2-dev libsdl-net1.2-dev libsdl-sound1.2-dev + - name: Build + env: + CC: gcc-8 + CXX: g++-8 + run: | + # build steps + set -x + $CXX --version + ./autogen.sh + ./configure + make -j "$(nproc)" + + build_ubuntu: + name: "GCC" + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04, ubuntu-16.04] + steps: + - uses: actions/checkout@v1 + - name: "Install packages" + run: sudo apt-get install libsdl1.2-dev libsdl-net1.2-dev libsdl-sound1.2-dev + - name: Build + run: | + # build steps + set -x + g++ --version + ./autogen.sh + ./configure + make -j "$(nproc)" + + build_clang: + name: "Clang 6 (ubuntu-18.04)" + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - name: "Install packages" + run: sudo apt-get install libsdl1.2-dev libsdl-net1.2-dev libsdl-sound1.2-dev + - name: Build + env: + CC: clang + CXX: clang++ + run: | + # build steps + set -x + $CXX --version + ./autogen.sh + ./configure + make -j "$(nproc)" + + build_macos: + name: "Clang (macOS-10.14)" + runs-on: macOS-10.14 + steps: + - uses: actions/checkout@v1 + - name: "Install packages" + run: brew install automake libpng sdl sdl_net sdl_sound + - name: Build + run: | + # build steps + set -x + clang++ --version + ./autogen.sh + ./configure + make -j "$(sysctl -n hw.physicalcpu)" diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 00000000..a59a29f5 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,29 @@ +name: Static code analysis + +on: [push] + +jobs: + + build_clang_static_analyser: + name: "Clang static analyzer" + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - name: "Install packages" + run: sudo apt-get install libsdl1.2-dev libsdl-net1.2-dev libsdl-sound1.2-dev python3-setuptools + - name: "Install scan-build (Python version)" + run: sudo pip3 install scan-build + - name: Build + run: | + # build steps + set -x + g++ --version + ./autogen.sh + ./configure + intercept-build make -j "$(nproc)" + - name: Analyze + run: analyze-build -v -o report --html-title="dosbox-staging (${GITHUB_SHA:0:8})" + - uses: actions/upload-artifact@master + with: + name: report + path: report