Skip to content

Commit 30f6bd0

Browse files
committed
Split the GHA workflow
1 parent b6d37fe commit 30f6bd0

File tree

7 files changed

+195
-175
lines changed

7 files changed

+195
-175
lines changed

.github/workflows/actionlint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: actionlint
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
actionlint:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Update ShellCheck
13+
run: |
14+
sudo apt-get update
15+
sudo apt-get install -y shellcheck
16+
shellcheck -V
17+
18+
- name: actionlint
19+
run: |
20+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
21+
./actionlint -color

.github/workflows/build.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
test:
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
include:
12+
- { target: x86_64-pc-windows-msvc, os: windows-2019 }
13+
- { target: x86_64-pc-windows-msvc, os: windows-2022 }
14+
- { target: x86_64-apple-darwin, os: macos-11 }
15+
- { target: x86_64-apple-darwin, os: macos-12 }
16+
- { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 }
17+
- { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 }
18+
name: test (${{ matrix.target }})
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- name: Read ./rust-toolchain
24+
id: read-rust-toolchain
25+
run: echo "toolchain=$(cat ./rust-toolchain)" >> "$GITHUB_OUTPUT"
26+
shell: bash
27+
28+
- name: Set up Rust
29+
uses: dtolnay/rust-toolchain@master
30+
with:
31+
toolchain: ${{ steps.read-rust-toolchain.outputs.toolchain }}
32+
targets: ${{ matrix.target }}
33+
34+
- name: Test (main)
35+
run: cargo test --target ${{ matrix.target }}
36+
37+
docker-build:
38+
runs-on: ubuntu-22.04
39+
steps:
40+
- uses: actions/checkout@v3
41+
42+
- name: Update ShellCheck
43+
run: |
44+
sudo apt-get update
45+
sudo apt-get install -y shellcheck
46+
shellcheck -V
47+
48+
- name: Read ./rust-toolchain
49+
id: read-rust-toolchain
50+
run: echo "toolchain=$(cat ./rust-toolchain)" >> "$GITHUB_OUTPUT"
51+
shell: bash
52+
53+
- name: Set up Rust
54+
uses: dtolnay/rust-toolchain@master
55+
with:
56+
toolchain: ${{ steps.read-rust-toolchain.outputs.toolchain }}
57+
58+
- name: Generate install-command.bash
59+
run: cargo xtask gen-command > ./install-command.bash
60+
61+
- name: docker-build
62+
run: docker build .

.github/workflows/ci.yml

Lines changed: 0 additions & 174 deletions
This file was deleted.

.github/workflows/licenses.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Licenses
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
cargo-deny:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Read ./rust-toolchain
13+
id: read-rust-toolchain
14+
run: echo "toolchain=$(cat ./rust-toolchain)" >> "$GITHUB_OUTPUT"
15+
shell: bash
16+
17+
- name: Set up Rust
18+
uses: dtolnay/rust-toolchain@master
19+
with:
20+
toolchain: ${{ steps.read-rust-toolchain.outputs.toolchain }}
21+
22+
- name: Install cargo-binstall
23+
uses: taiki-e/install-action@cargo-binstall
24+
25+
- name: Install cargo-deny
26+
run: cargo binstall cargo-deny@^0.13 --no-confirm --log-level debug
27+
28+
- name: cargo-deny (main)
29+
run: cargo deny check
30+
31+
bottlerocket-license-scan:
32+
runs-on: ubuntu-22.04
33+
steps:
34+
- uses: actions/checkout@v3
35+
36+
- name: Read ./rust-toolchain
37+
id: read-rust-toolchain
38+
run: echo "toolchain=$(cat ./rust-toolchain)" >> "$GITHUB_OUTPUT"
39+
shell: bash
40+
41+
- name: Set up Rust
42+
uses: dtolnay/rust-toolchain@master
43+
with:
44+
toolchain: ${{ steps.read-rust-toolchain.outputs.toolchain }}
45+
46+
- name: Install bottlerocket-license-scan
47+
run: cargo install bottlerocket-license-scan --git https://github.com/bottlerocket-os/bottlerocket-sdk
48+
49+
- name: bottlerocket-license-scan (main)
50+
run: |
51+
git clone https://github.com/spdx/license-list-data.git /tmp/license-list-data --depth 1
52+
~/.cargo/bin/bottlerocket-license-scan --clarify ./clarify.toml --out-dir ./license_files --spdx-data /tmp/license-list-data/json/details cargo ./Cargo.toml
53+
tree ./license_files

.github/workflows/rust-lint.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Rust Lint
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
rustfmt:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Read ./rust-toolchain
13+
id: read-rust-toolchain
14+
run: echo "toolchain=$(cat ./rust-toolchain)" >> "$GITHUB_OUTPUT"
15+
shell: bash
16+
17+
- name: Set up Rust
18+
uses: dtolnay/rust-toolchain@master
19+
with:
20+
toolchain: ${{ steps.read-rust-toolchain.outputs.toolchain }}
21+
components: rustfmt
22+
23+
- name: Rustfmt (main)
24+
run: cargo fmt --all -- --check
25+
26+
- name: Rustfmt (xtask)
27+
run: cargo fmt --all --manifest-path ./xtask/Cargo.toml -- --check
28+
29+
clippy:
30+
runs-on: ubuntu-22.04
31+
steps:
32+
- uses: actions/checkout@v3
33+
34+
- name: Read ./rust-toolchain
35+
id: read-rust-toolchain
36+
run: echo "toolchain=$(cat ./rust-toolchain)" >> "$GITHUB_OUTPUT"
37+
shell: bash
38+
39+
- name: Set up Rust
40+
uses: dtolnay/rust-toolchain@master
41+
with:
42+
toolchain: ${{ steps.read-rust-toolchain.outputs.toolchain }}
43+
components: clippy
44+
45+
- name: Clippy (xtask)
46+
run: cargo clippy --manifest-path ./xtask/Cargo.toml

.github/workflows/typos.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: typos
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
typos:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- uses: crate-ci/typos@master

xtask/templates/install-command.bash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ curl https://raw.githubusercontent.com/rust-lang-ja/atcoder-proposal/{{ git_rev
3535
# transitive dependenciesのライセンスについては:
3636
# - https://github.com/rust-lang-ja/atcoder-proposal/blob/{{ git_rev }}/deny.toml
3737
# - https://github.com/rust-lang-ja/atcoder-proposal/blob/{{ git_rev }}/clarify.toml
38-
# - https://github.com/rust-lang-ja/atcoder-proposal/actions
38+
# - https://github.com/rust-lang-ja/atcoder-proposal/actions/workflows/licenses.yml
3939

4040
echo 'fn main() {}' > ./src/main.rs
4141

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy