aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build-ubuntu.yml
blob: 5974c69a7018c2c88fb260608257f1099947c7f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: CMake Build (Ubuntu x86-64)

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

env:
  BUILD_TYPE: Release
  CMAKE_VERSION: 3.15.2

jobs:
  build:

    runs-on: ubuntu-20.04

    steps:
    - uses: actions/checkout@v1
    - name: Install dependencies
      shell: bash
      working-directory: ${{runner.workspace}}
      run: | # Fetch a new version of CMake, because the default is too old.
        sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list \
        && sudo apt-get update \
        && sudo apt-get install cmake libcurl4-gnutls-dev libpcap0.8-dev libsdl2-dev qt5-default libslirp-dev
    - name: Create build environment
      run: mkdir ${{runner.workspace}}/build
    - name: Configure
      shell: bash
      working-directory: ${{runner.workspace}}/build
      run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
    - name: Make
      shell: bash
      working-directory: ${{runner.workspace}}/build
      run: |
        make -j$(nproc --all) \
        && mkdir dist \
        && cp melonDS dist
    - uses: actions/upload-artifact@v1
      with:
        name: melonDS
        path: ${{runner.workspace}}/build/dist