From a28f97138f2faacf762f9907b93402301d0eccaf Mon Sep 17 00:00:00 2001 From: Christian Vetter Date: Wed, 16 Feb 2022 17:12:38 +0100 Subject: [PATCH] Switch from Travis to Github Actions (#225) Signed-off-by: Christian Vetter --- .github/workflows/cpp.yml | 34 +++++++ .github/workflows/dot.yml | 23 +++++ .github/workflows/generator.yml | 29 ++++++ .github/workflows/py.yml | 30 +++++++ .github/workflows/rust.yml | 32 +++++++ .travis.yml | 152 -------------------------------- 6 files changed, 148 insertions(+), 152 deletions(-) create mode 100644 .github/workflows/cpp.yml create mode 100644 .github/workflows/dot.yml create mode 100644 .github/workflows/generator.yml create mode 100644 .github/workflows/py.yml create mode 100644 .github/workflows/rust.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml new file mode 100644 index 00000000..77ef2944 --- /dev/null +++ b/.github/workflows/cpp.yml @@ -0,0 +1,34 @@ +name: flatdata-rs +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +env: + CARGO_TERM_COLORS: always + +jobs: + GCC: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Dependencies + run: sudo apt-get install python3-pip python3-setuptools libboost-filesystem-dev + - name: Generator + run: pip3 install ./flatdata-generator + - name: Build and Test + run: | + CC=gcc CXX=g++ flatdata-cpp/ci/build-and-test-cpp.sh + Clang: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Dependencies + run: sudo apt-get install python3-pip python3-setuptools libboost-filesystem-dev + - name: Generator + run: pip3 install ./flatdata-generator + - name: Build and Test + run: | + CC=clang CXX=clang++ flatdata-cpp/ci/build-and-test-cpp.sh diff --git a/.github/workflows/dot.yml b/.github/workflows/dot.yml new file mode 100644 index 00000000..5471fd68 --- /dev/null +++ b/.github/workflows/dot.yml @@ -0,0 +1,23 @@ +name: flatdata-dot +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +env: + CARGO_TERM_COLORS: always + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Dependencies + run: sudo apt-get install graphviz + - name: Generator + run: pip3 install ./flatdata-generator + - name: Build and Test + run: | + ci/dot_test_cases.sh diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml new file mode 100644 index 00000000..89313072 --- /dev/null +++ b/.github/workflows/generator.yml @@ -0,0 +1,29 @@ +name: flatdata-generator +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +env: + CARGO_TERM_COLORS: always + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install + run: | + cd flatdata-generator + # runtime requirements + pip install -r requirements.txt + # CI requirements + pip install nose pylint + - name: Run tests + run: | + cd flatdata-generator + python -m nose + pip install . + flatdata-generator --help \ No newline at end of file diff --git a/.github/workflows/py.yml b/.github/workflows/py.yml new file mode 100644 index 00000000..ebb68aad --- /dev/null +++ b/.github/workflows/py.yml @@ -0,0 +1,30 @@ +name: flatdata-py +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +env: + CARGO_TERM_COLORS: always + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install + run: | + pip install ./flatdata-generator + cd flatdata-py + # runtime requirements + pip install -r requirements.txt + # CI requirements + pip install nose pylint + - name: Run tests + run: | + cd flatdata-py + python -m nose + pip install . + flatdata-inspector --help \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 00000000..922283b0 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,32 @@ +name: flatdata-rs +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +env: + CARGO_TERM_COLORS: always + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Dependencies + run: sudo apt-get install python3-venv + - name: Build + run: | + # use generator from source + export FLATDATA_GENERATOR_PATH=${PWD}/flatdata-generator + cd flatdata-rs + cargo build --all-targets + cargo build --all-targets --all-features + - name: Run tests + run: | + # use generator from source + export FLATDATA_GENERATOR_PATH=${PWD}/flatdata-generator + cd flatdata-rs + cargo test --all-targets + cargo test --all-targets --all-features \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8f394c54..00000000 --- a/.travis.yml +++ /dev/null @@ -1,152 +0,0 @@ -sudo: required -dist: focal -language: minimal - -matrix: - allow_failures: - - rust: beta # see: https://github.com/rust-lang/rust/issues/63888 - - rust: nightly - - include: - # flatdata-generator - - language: python - name: "flatdata-generator" - python: 3.9 - install: - - cd flatdata-generator - - pip install -r requirements.txt # runtime requirements - - pip install nose pylint # CI requirements - script: - # run tests - - python -m nose - # try to install - - pip install . - - flatdata-generator --help - - # flatdata-py - - language: python - name: "flatdata-py" - python: 3.9 - install: - - pip install ./flatdata-generator - - cd flatdata-py - - pip install -r requirements.txt # runtime requirements - - pip install nose pylint # CI requirements - script: - - python -m nose - - pip install . - - flatdata-inspector --help - - # cpp - - language: cpp - name: "flatdata-cpp" - compiler: gcc - addons: - apt: - packages: - - python3-pip - - python3-setuptools - - libboost-filesystem-dev - install: - - pip3 install ./flatdata-generator - script: - - flatdata-cpp/ci/build-and-test-cpp.sh - - # cpp - - language: cpp - name: "flatdata-cpp" - compiler: clang - addons: - apt: - packages: - - python3-pip - - python3-setuptools - - libboost-filesystem-dev - install: - - pip3 install ./flatdata-generator - script: - - flatdata-cpp/ci/build-and-test-cpp.sh - - # go - - language: go - name: "flatdata-go" - go: 1.x - install: true - before_script: - - go get github.com/golang/dep/cmd/dep - - go get golang.org/x/lint/golint - script: - - | - set -ex - pushd flatdata-go/flatdata; make run-ci; popd - docker run -t --user `id -u $USER` -v $(pwd):/src -w /src boxdot/flatdata-dev:15 \ - ./generator -v -g go \ - -s flatdata-go/backward-compatibility-tests/test_backward_compatibility.schema \ - -O flatdata-go/backward-compatibility-tests/test_backward_compatibility_generated.go - pushd flatdata-go/backward-compatibility-tests; make run-ci; popd - - # dot - - language: python - name: "flatdata-dot" - addons: - apt: - packages: - - graphviz - install: - - pip3 install ./flatdata-generator - script: - - ci/dot_test_cases.sh - - # rust - - language: rust - name: "flatdata-rs" - rust: stable - cache: - - cargo - addons: - apt: - packages: - - python3-venv - script: - - export FLATDATA_GENERATOR_PATH=${PWD}/flatdata-generator # use generator from source - - cd flatdata-rs - - cargo build - - cargo test - - cargo build --all-features - - cargo test --all-features - after_success: - - cargo coveralls - - # rust - - language: rust - name: "flatdata-rs" - dist: bionic - rust: beta - cache: - - cargo - addons: - apt: - packages: - - python3-venv - script: - - export FLATDATA_GENERATOR_PATH=${PWD}/flatdata-generator # use generator from source - - cd flatdata-rs - - cargo build - - cargo test - - # rust - - language: rust - name: "flatdata-rs" - dist: bionic - rust: nightly - cache: - - cargo - addons: - apt: - packages: - - python3-venv - script: - - export FLATDATA_GENERATOR_PATH=${PWD}/flatdata-generator # use generator from source - - cd flatdata-rs - - cargo build - - cargo test