From aa18ab4bb41f72c7430d05dc727857dca397a03b Mon Sep 17 00:00:00 2001 From: Niklas Hauser Date: Sun, 11 Jul 2021 01:22:04 +0200 Subject: [PATCH] [ci] Move to GitHub Actions --- .github/workflows/deloy.yml | 28 +++++++++ .github/workflows/tests.yml | 119 ++++++++++++++++++++++++++++++++++++ .travis.yml | 35 ----------- README.md | 1 - 4 files changed, 147 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/deloy.yml create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/deloy.yml b/.github/workflows/deloy.yml new file mode 100644 index 00000000..e75bd216 --- /dev/null +++ b/.github/workflows/deloy.yml @@ -0,0 +1,28 @@ +name: Upload PyPi Package + +on: + push: + branches: + - develop + - develop-** + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install lxml jinja2 deepdiff CppHeaderParser setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload --skip-existing dist/* diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..28ba5998 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,119 @@ +name: Generate + +on: + schedule: + - cron: '23 7 * * *' + pull_request: + +env: + MAKEFLAGS: -j4 + +jobs: + stm32-f4-g4-l0: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install lxml jinja2 deepdiff CppHeaderParser + - name: Generate STM32 data + run: | + cd tools/generator + make generate-stm32f4 generate-stm32g4 generate-stm32l0 + - name: Synchronize Docs + run: | + python3 tools/scripts/sync_docs.py + git diff -- README.md + git status --porcelain + git diff $(git diff --name-only | sed -n 1p) + (( $(git status --porcelain | wc -l) == 0 )) + + stm32-g0-h7-l4: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install lxml jinja2 deepdiff CppHeaderParser + - name: Generate STM32 data + run: | + cd tools/generator + make generate-stm32g0 generate-stm32h7 generate-stm32l4 + - name: Synchronize Docs + run: | + python3 tools/scripts/sync_docs.py + git diff -- README.md + git status --porcelain + git diff $(git diff --name-only | sed -n 1p) + (( $(git status --porcelain | wc -l) == 0 )) + + stm32-f0-f1-f2-f3-f7-l1-wb-wl: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install lxml jinja2 deepdiff CppHeaderParser + - name: Generate STM32 data + run: | + cd tools/generator + make generate-stm32f0 generate-stm32f1 generate-stm32f2 generate-stm32f3 \ + generate-stm32f7 generate-stm32l1 generate-stm32wb generate-stm32wl + - name: Synchronize Docs + run: | + python3 tools/scripts/sync_docs.py + git diff -- README.md + git status --porcelain + git diff $(git diff --name-only | sed -n 1p) + (( $(git status --porcelain | wc -l) == 0 )) + + avr-sam-nrf: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install lxml jinja2 deepdiff CppHeaderParser + - name: Run Unit Tests + run: | + make test + - name: Generate AVR data + run: | + cd tools/generator + make generate-avr + - name: Generate SAM data + run: | + cd tools/generator + make generate-sam + - name: Generate NRF data + run: | + cd tools/generator + make generate-nrf + - name: Synchronize Docs + run: | + python3 tools/scripts/sync_docs.py + git diff -- README.md + git status --porcelain + git diff $(git diff --name-only | sed -n 1p) + (( $(git status --porcelain | wc -l) == 0 )) + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b4e64fe5..00000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: python -python: - - 3.8 - -env: - global: - - MAKEFLAGS="-j 4" - -install: - - pip install lxml jinja2 deepdiff CppHeaderParser - - sudo apt-get install openjdk-8-jdk - -script: - - (cd tools/device; make test) - - (cd tools/generator; make init) - - (cd tools/generator; make extract) - - (cd tools/generator; make generate-avr) - - (cd tools/generator; make generate-stm32) - - (cd tools/generator; make generate-sam) - - (cd tools/generator; make generate-nrf) - - python3 tools/scripts/sync_docs.py - - git diff -- README.md - - git status --porcelain - - git diff $(git diff --name-only | sed -n 1p) - - (( $(git status --porcelain | wc -l) == 0 )) - -deploy: - provider: pypi - distributions: sdist bdist_wheel - skip_existing: true - user: salkinium - password: - secure: P34ztjRmcbpX7sii7E/ZM4Gf1Xz2FYDAs5EXk0zqOOjOp62D3I5U4UBqtVB/apJSVHu+HLpropVfJgBFShRDFIvh7poxLDdbYsmxHy/pStzcC53pZmqhUNxTjSuBbB435evSU7Io36rR69BYy+w3ef2OPG1WrHm5eSExM/hfPqz3bXp/rMxKpHQWSczMR5B4pbW0NnzjbMQOrUdoM9OX/leJIZayal72CY4Hulb3AA3M1Lf98hO/cCSmx8gY1YP6NflmHwz/C8WELePHOF717LiOoudi5tbkayPh0Bmj48z9T/mqIqrl8rIuWw0vgfD06drBZbmWV/N2dw3Bpx+eWo3GSRTOi0mQrD7xTkZTTJwv6lbOh5b+vMW78Um3j2s2OL/SSSeHvgaDjMydUq/D76drLUM6Ma2UBhK1wKSQe6wMSLxltJ1SX3gxYSdruDp0FlmiAwjUbjawqrJ/qV73p0PtCCTsBCfH1vcuFL+nDMBDtyL9VMNFOR3i86/7u/YomtxvtYYDEgnJiAa69HvTI2xzEwx5G8eNRHPnidTGYm92qmF+UyIWTsVaphLwfwiJi0UNXcgExEScl46Dg5thh26hrhQ+7wH9jDDuIIH5bt1q/x1Mqx75KMvbWqQbD7U88YnNZKrKX7nWP1cy2XQuY/z/3yy7aC7xXJXXq9mWnYY= - on: - branch: develop diff --git a/README.md b/README.md index 9e89115b..21ea1667 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ how to use this data. These tools and this data set is maintained and curated by [@salkinium][] only at [modm-io/modm-devices][modm-devices]. It is licensed under the MPLv2 license. -The CI checks daily for new data: [![](https://travis-ci.org/modm-io/modm-devices.svg?branch=develop)](https://travis-ci.org/modm-io/modm-devices) Currently data for 3552 devices is available. Please open an issue or better yet a pull request for additional support.