Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condense Actions .yml scripts #493

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 21 additions & 55 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Configure
run: cmake -B build -S . -DBUILD_EXAMPLES=ON

- name: Build
run: cmake --build build --config RelWithDebInfo --parallel $(nproc)

- name: Test
- run: cmake -B build -S . -DBUILD_EXAMPLES=ON
- run: cmake --build build --config RelWithDebInfo --parallel $(nproc)
- run: ctest -C RelWithDebInfo --output-on-failure
working-directory: build
run: ctest -C RelWithDebInfo --output-on-failure

- name: Install
run: cmake --install build --config RelWithDebInfo --prefix pkg
- run: cmake --install build --config RelWithDebInfo --prefix pkg

- uses: actions/upload-artifact@v4
with:
Expand All @@ -57,27 +50,17 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.version }}
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}

- name: Update version string
run: python3 ./tools/update_version.py

- name: Install build and tox Python packages
run: pip3 install build tox

- name: Build
run: python3 -m build --wheel

- name: Repair wheel
- run: python3 ./tools/update_version.py
- run: pip3 install build tox
- run: python3 -m build --wheel
- run: python3 ../.github/workflows/repair_wheel.py sleipnirgroup_jormungandr-*.whl
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
run: python3 ../.github/workflows/repair_wheel.py sleipnirgroup_jormungandr-*.whl
working-directory: dist

- name: Test
run: python3 -m tox -e ${{ matrix.version }}
- run: python3 -m tox -e ${{ matrix.version }}

- uses: actions/upload-artifact@v4
with:
Expand All @@ -94,19 +77,13 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.12
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Update version string
run: python3 ./tools/update_version.py

- name: Install build and tox Python packages
run: pip3 install build tox

- name: Build
run: python3 -m build --sdist
- run: python3 ./tools/update_version.py
- run: pip3 install build tox
- run: python3 -m build --sdist

- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -147,14 +124,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Configure
run: cmake -B build -S . --toolchain ${{ matrix.toolchain }} -DBUILD_EXAMPLES=ON

- name: Build
run: cmake --build build --config RelWithDebInfo --parallel $(nproc)

- name: Install
run: cmake --install build --config RelWithDebInfo --prefix pkg
- run: cmake -B build -S . --toolchain ${{ matrix.toolchain }} -DBUILD_EXAMPLES=ON
- run: cmake --build build --config RelWithDebInfo --parallel $(nproc)
- run: cmake --install build --config RelWithDebInfo --prefix pkg

- uses: actions/upload-artifact@v4
with:
Expand All @@ -167,17 +139,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup emscripten
uses: numworks/setup-emscripten@latest

- name: Configure
run: emcmake cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF

- name: Build
run: cmake --build build --config Release --parallel $(nproc)
- uses: numworks/setup-emscripten@latest

- name: Install
run: cmake --install build --config Release --prefix pkg
- run: emcmake cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF
- run: cmake --build build --config Release --parallel $(nproc)
- run: cmake --install build --config Release --prefix pkg

- uses: actions/upload-artifact@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create build directory
run: mkdir build

- name: Run Doxygen
uses: mattnotmitt/doxygen-action@edge
- run: mkdir build
- uses: mattnotmitt/doxygen-action@edge
with:
doxyfile-path: 'docs/Doxyfile'

Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@ jobs:
git checkout -b pr
git branch -f main origin/main

- name: Set up Python 3.8
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install wpiformat
run: pip3 install wpiformat==2024.33
- run: pip3 install wpiformat==2024.33

- name: Run
run: wpiformat==2024.33
- run: wpiformat

- name: Check output
run: git --no-pager diff --exit-code HEAD
Expand Down Expand Up @@ -67,10 +64,9 @@ jobs:
git checkout -b pr
git branch -f main origin/main

- name: Set up Python 3.8
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install LLVM 17
run: |
Expand All @@ -83,8 +79,7 @@ jobs:
echo "CXX=clang++" >> $GITHUB_ENV
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV

- name: Install wpiformat
run: pip3 install wpiformat
- run: pip3 install wpiformat

- name: Create compile_commands.json
run: cmake -B build -S . -DCMAKE_EXPORT_COMPILE_COMMANDS=YES
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ jobs:
echo "CXX=clang++" >> $GITHUB_ENV
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV

- name: Configure
run: cmake -B build -S . ${{ matrix.cmake-flags }} -DBUILD_EXAMPLES=ON

- name: Build
run: cmake --build build --target all --config RelWithDebInfo --parallel $(nproc)

- name: Test
- run: cmake -B build -S . ${{ matrix.cmake-flags }} -DBUILD_EXAMPLES=ON
- run: cmake --build build --target all --config RelWithDebInfo --parallel $(nproc)
- run: ${{ matrix.ctest-env }} ctest -C RelWithDebInfo --output-on-failure
working-directory: build
run: ${{ matrix.ctest-env }} ctest -C RelWithDebInfo --output-on-failure
18 changes: 6 additions & 12 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,14 @@ jobs:

runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create build directory
run: mkdir build
- name: Run Doxygen
uses: mattnotmitt/doxygen-action@edge
- uses: actions/checkout@v4
- run: mkdir build
- uses: mattnotmitt/doxygen-action@edge
with:
doxyfile-path: 'docs/Doxyfile'
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
- uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
path: build/docs/html
- name: Deploy to GitHub Pages
- uses: actions/deploy-pages@v1
id: deployment
uses: actions/deploy-pages@v1
Loading