From c133d97c043ca5887beef6cc744c1a4a2f3df91e Mon Sep 17 00:00:00 2001 From: Konstantin Khlebnikov Date: Wed, 1 Jan 2025 17:19:15 +0100 Subject: [PATCH] github workflow --- .github/workflows/ci.yaml | 75 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 7 ---- 2 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..03c96e1 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,75 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build: + strategy: + fail-fast: false + matrix: + build: + # https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job + - os: ubuntu-latest + + - os: ubuntu-latest + image: ubuntu:20.04 + - os: ubuntu-latest + image: ubuntu:22.04 + - os: ubuntu-latest + image: ubuntu:24.04 + + - os: ubuntu-latest + image: fedora:40 + - os: ubuntu-latest + image: fedora:41 + - os: ubuntu-latest + image: fedora:42 + + - os: ubuntu-latest + image: debian:11 + - os: ubuntu-latest + image: debian:12 + + - os: macos-13 + - os: macos-14 + - os: macos-15 + + - os: ubuntu-latest + image: ubuntu:24.04 + target: x86_64-w64-mingw32 + + runs-on: ${{ matrix.build.os }} + + container: ${{ matrix.build.image }} + + steps: + # https://github.com/actions/checkout + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Dependencies (ubuntu, debian) + if: ${{ startsWith(matrix.build.image, 'ubuntu') || startsWith(matrix.build.image, 'debian') }} + run: | + apt-get update + apt-get install -y build-essential + + - name: Dependencies (fedora) + if: ${{ startsWith(matrix.build.image, 'fedora') }} + run: | + dnf group install -y development-tools c-development + + - name: Build (mingw) + if: ${{ contains(matrix.build.target, 'mingw') }} + run: | + apt-get update + apt-get install -y mingw-w64 + make mingw + + - name: Build + run: make + + - name: Test + run: make test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ab8c643..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -os: - - linux - - osx - -script: - - make - - make test