Skip to content

Commit

Permalink
Merge pull request #98 from noritada/chore/cicd-yaml-reformatting
Browse files Browse the repository at this point in the history
CI/CD: unify the format of YAML files

This PR unifies the format of YAML files for CI/CD, allowing us to concentrate only on their contents.
  • Loading branch information
noritada committed Sep 9, 2024
2 parents 54dccdd + 3e8da9a commit 11a5ed9
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 124 deletions.
68 changes: 34 additions & 34 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@ name: "Bug report \U0001F41B"
description: Create a bug report to help us improve
labels: [bug]
body:
- type: textarea
attributes:
label: Simple Description on the Bug
description: A clear and concise description on what is the problem for you.
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
placeholder: |
Examples of steps in case you use the library:
1. Pass ... to ...
2. See error ...
- type: textarea
attributes:
label: Simple Description on the Bug
description: A clear and concise description on what is the problem for you.
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
placeholder: |
Examples of steps in case you use the library:
1. Pass ... to ...
2. See error ...
Examples of steps in case you use the CLI:
1. Run ... with command line arguments ... on OS ...
2. See error ...
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Actual Behavior
description: A clear and concise description of what you actually saw.
validations:
required: true
- type: textarea
attributes:
label: Additional Context
description: Any other context about the problem.
Examples of steps in case you use the CLI:
1. Run ... with command line arguments ... on OS ...
2. See error ...
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Actual Behavior
description: A clear and concise description of what you actually saw.
validations:
required: true
- type: textarea
attributes:
label: Additional Context
description: Any other context about the problem.
24 changes: 12 additions & 12 deletions .github/ISSUE_TEMPLATE/data-support-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: "Data support request \U0001F4E1"
description: Suggest a support of specific data
labels: [data-support]
body:
- type: textarea
attributes:
label: Detailed Information on the Data
placeholder: |
- A URL of available sample data, which can be included in this project without concerns about license and size if possible.
- A URL of specification or other resources concerning that format, if any.
validations:
required: true
- type: textarea
attributes:
label: Additional Context
description: Any other context about the data support request.
- type: textarea
attributes:
label: Detailed Information on the Data
placeholder: |
- A URL of available sample data, which can be included in this project without concerns about license and size if possible.
- A URL of specification or other resources concerning that format, if any.
validations:
required: true
- type: textarea
attributes:
label: Additional Context
description: Any other context about the data support request.
82 changes: 41 additions & 41 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CD

on:
push:
branches: [ master, 'release/v[0-9].[0-9]' ]
branches: [master, "release/v[0-9].[0-9]"]

workflow_dispatch:

Expand All @@ -23,43 +23,43 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
# - name: Set up musl
# if: matrix.target == 'x86_64-unknown-linux-musl'
# run: |
# rustup target add x86_64-unknown-linux-musl
# sudo apt -qq install musl-tools
# - name: Set up C++ build tools for building PROJ
# if: matrix.target == 'x86_64-unknown-linux-musl'
# run: |
# sudo apt -qq install build-essential g++-multilib
# sudo ln -s /usr/bin/g++ /usr/bin/musl-g++
- name: Build
run: cargo build --release --target ${{ matrix.target }} --verbose --workspace
- name: Create an archive to maintain the file permission (in non-Windows environments)
if: matrix.target != 'x86_64-pc-windows-msvc'
run: |
tar -C target/${{ matrix.target }}/release -cvf gribber-${{ matrix.target }}.tar.xz gribber
- name: Create an archive to maintain the file permission (in Windows environments)
if: matrix.target == 'x86_64-pc-windows-msvc'
run: |
powershell Compress-Archive -Path target/${{ matrix.target }}/release/gribber.exe -DestinationPath gribber-${{ matrix.target }}.zip
- name: Upload artifacts (in non-Windows environments)
if: matrix.target != 'x86_64-pc-windows-msvc'
uses: actions/upload-artifact@v4
with:
name: gribber-${{ matrix.target }}
path: gribber-${{ matrix.target }}.tar.xz
- name: Upload artifacts (in Windows environments)
if: matrix.target == 'x86_64-pc-windows-msvc'
uses: actions/upload-artifact@v4
with:
name: gribber-${{ matrix.target }}
path: gribber-${{ matrix.target }}.zip
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
# - name: Set up musl
# if: matrix.target == 'x86_64-unknown-linux-musl'
# run: |
# rustup target add x86_64-unknown-linux-musl
# sudo apt -qq install musl-tools
# - name: Set up C++ build tools for building PROJ
# if: matrix.target == 'x86_64-unknown-linux-musl'
# run: |
# sudo apt -qq install build-essential g++-multilib
# sudo ln -s /usr/bin/g++ /usr/bin/musl-g++
- name: Build
run: cargo build --release --target ${{ matrix.target }} --verbose --workspace
- name: Create an archive to maintain the file permission (in non-Windows environments)
if: matrix.target != 'x86_64-pc-windows-msvc'
run: |
tar -C target/${{ matrix.target }}/release -cvf gribber-${{ matrix.target }}.tar.xz gribber
- name: Create an archive to maintain the file permission (in Windows environments)
if: matrix.target == 'x86_64-pc-windows-msvc'
run: |
powershell Compress-Archive -Path target/${{ matrix.target }}/release/gribber.exe -DestinationPath gribber-${{ matrix.target }}.zip
- name: Upload artifacts (in non-Windows environments)
if: matrix.target != 'x86_64-pc-windows-msvc'
uses: actions/upload-artifact@v4
with:
name: gribber-${{ matrix.target }}
path: gribber-${{ matrix.target }}.tar.xz
- name: Upload artifacts (in Windows environments)
if: matrix.target == 'x86_64-pc-windows-msvc'
uses: actions/upload-artifact@v4
with:
name: gribber-${{ matrix.target }}
path: gribber-${{ matrix.target }}.zip
83 changes: 47 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: CI

on:
push:
branches: [ master, testing, 'release/v[0-9].[0-9]' ]
branches: [master, testing, "release/v[0-9].[0-9]"]
pull_request:
branches: [ master ]
branches: [master]
schedule:
- cron: '0 21 * * *'
- cron: "0 21 * * *"

workflow_dispatch:

Expand Down Expand Up @@ -62,45 +62,45 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
# - name: Set up musl
# if: matrix.target == 'x86_64-unknown-linux-musl'
# run: |
# rustup target add x86_64-unknown-linux-musl
# sudo apt -qq install musl-tools
# - name: Set up C++ build tools for building PROJ
# if: matrix.target == 'x86_64-unknown-linux-musl'
# run: |
# sudo apt -qq install build-essential g++-multilib
# sudo ln -s /usr/bin/g++ /usr/bin/musl-g++
- name: Build
run: cargo build --target ${{ matrix.target }} --verbose --workspace ${{ matrix.features }}
- name: Run tests
if: matrix.with_test
run: cargo test --target ${{ matrix.target }} --verbose --workspace ${{ matrix.features }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
# - name: Set up musl
# if: matrix.target == 'x86_64-unknown-linux-musl'
# run: |
# rustup target add x86_64-unknown-linux-musl
# sudo apt -qq install musl-tools
# - name: Set up C++ build tools for building PROJ
# if: matrix.target == 'x86_64-unknown-linux-musl'
# run: |
# sudo apt -qq install build-essential g++-multilib
# sudo ln -s /usr/bin/g++ /usr/bin/musl-g++
- name: Build
run: cargo build --target ${{ matrix.target }} --verbose --workspace ${{ matrix.features }}
- name: Run tests
if: matrix.with_test
run: cargo test --target ${{ matrix.target }} --verbose --workspace ${{ matrix.features }}

build_wasm:
name: Building library for wasm
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Build
run: cargo build --target wasm32-unknown-unknown --verbose
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Build
run: cargo build --target wasm32-unknown-unknown --verbose

address_sanitizer:
name: Address sanitizer
Expand All @@ -117,3 +117,14 @@ jobs:
RUSTFLAGS: -Z sanitizer=address
RUSTDOCFLAGS: -Z sanitizer=address
run: cargo test --target x86_64-unknown-linux-gnu --workspace --features gridpoints-proj

check_github_config_formats:
name: Check GitHub config formats
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Prettier
run: npm install -g prettier
- name: Run prettier
run: prettier .github --check
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy the latest documentation and WASM app to GitHub Pages
on:
push:
branches: [ master ]
branches: [master]

workflow_dispatch:

Expand Down

0 comments on commit 11a5ed9

Please sign in to comment.