Skip to content

Commit

Permalink
[CI] Update GitHub actions (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvervloesem authored Aug 1, 2023
1 parent 97a5eed commit e9d9cca
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 51 deletions.
46 changes: 20 additions & 26 deletions .github/workflows/PR_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
gcc:
name: GCC
Expand All @@ -23,15 +23,15 @@ jobs:
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
env:
Expand All @@ -57,15 +57,15 @@ jobs:
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.clang }}
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
env:
Expand All @@ -90,9 +90,9 @@ jobs:
- xcode: "13.2.1"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
uses: actions/checkout@v3
with:
submodules: recursive
- name: Select XCode version
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- name: Configure
Expand All @@ -112,9 +112,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
- name: Build
Expand All @@ -125,9 +125,9 @@ jobs:
examples:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
Expand All @@ -146,17 +146,11 @@ jobs:
submodules: recursive
fetch-depth: 0 # deep clone for setuptools-scm
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
- name: Install make tools
run: |
python3 -m pip install --upgrade pip
pip3 install setuptools setuptools_scm cmake wheel scikit-build ninja
- name: get lastest release tag
id: last_release
uses: InsonusK/[email protected]
with:
myToken: ${{ github.token }}
view_top: 1
- name: Install python decoder
run: |
cd python
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
gcc:
name: GCC
Expand Down Expand Up @@ -39,13 +39,13 @@ jobs:
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
env:
Expand Down Expand Up @@ -99,9 +99,9 @@ jobs:
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.clang }}
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
env:
Expand Down Expand Up @@ -131,9 +131,9 @@ jobs:
- xcode: "13.2.1"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
uses: actions/checkout@v3
with:
submodules: recursive
- name: Select XCode version
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- name: Configure
Expand All @@ -154,9 +154,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
- name: Build
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/manual_test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Publish to TestPyPI
on:
workflow_dispatch:
permissions:
id-token: write
jobs:
build-n-publish:
name: Build and publish distribution to TestPyPI
Expand All @@ -10,7 +12,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0 # deep clone for setuptools-scm
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install pypa/build
Expand All @@ -22,7 +24,7 @@ jobs:
cd python
python3 setup.py sdist
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Publish to Pypi

on:
workflow_dispatch:
release:
types: [published]
permissions:
id-token: write
jobs:
build-n-publish:
name: Build and publish distributions to PyPI
Expand All @@ -13,7 +14,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0 # deep clone for setuptools-scm
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
- name: Install pypa/build
run: |
python3 -m pip install --upgrade pip
Expand All @@ -23,6 +24,6 @@ jobs:
cd python
python3 setup.py sdist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:
runs-on: ubuntu-20.04
name: Create the documentation and deploy it to GitHub Pages
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: "14.x"
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.11"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -34,4 +34,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vuepress/dist
cname: decoder.theengs.io
cname: decoder.theengs.io

0 comments on commit e9d9cca

Please sign in to comment.