-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
CI Improvements #160
Comments
Check out the issue-160 branch for a CI workflow based on CI w/ GH actions and Rust using actions-rs: The run completely successfully, so we'd be able to have clear separation of concerns between on:
push:
paths-ignore:
- '**.md'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
workflow_dispatch:
name: CI
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: stable
TOOLCHAIN_PROFILE: minimal
jobs:
lints:
name: Run cargo fmt and cargo clippy
runs-on: ubuntu-latest
steps:
- name: Install ALSA dev
run: |
sudo apt-get update
sudo apt-get install libasound2-dev
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt, clippy
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
test:
name: Run cargo test
runs-on: ubuntu-latest
steps:
- name: Install ALSA dev
run: |
sudo apt-get update
sudo apt-get install libasound2-dev
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Run cargo test --no-run
uses: actions-rs/cargo@v1
with:
command: test
args: "--no-run"
- name: Run cargo test
uses: actions-rs/cargo@v1
env:
RUST_TEST_THREADS: 1
with:
command: test
args: "-p hotham --lib" |
Nice work @davidkuhta ! Would you be able to investigate caching here? Potentially we could avoid having to download all the crates and install ALSA each time. The other option I was thinking was just dockerising the whole CI process. |
Were you meaning something beyond the cache step? - name: Cache
uses: Swatinem/rust-cache@v1 Compare CI Run 5 to CI Run 6, where the the first job "Run cargo fmt and cargo clippy" succeeds in both; it did cache and ran in |
Oh *hells* yeahs! I didn't see that part!
Fantastic work!
…On Tue, Feb 22, 2022 at 3:09 PM David Kuhta ***@***.***> wrote:
Nice work @davidkuhta <https://github.com/davidkuhta> !
Would you be able to investigate caching here? Potentially we could avoid
having to download all the crates and install ALSA each time.
The other option I was thinking was just dockerising the whole CI process.
Were you meaning something beyond the cache step?
- name: Cache
uses: ***@***.***
Comparing CI Run 5
<https://github.com/leetvr/hotham/actions/runs/1877675723> to CI Run 6
<https://github.com/leetvr/hotham/actions/runs/1877748200>, where the the
first job "Run cargo fmt and cargo clippy" succeeds in both; it did cache
and ran in 40s vs the 10m50s.
—
Reply to this email directly, view it on GitHub
<#160 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPNXZYNQT5CADMJTMEBLGTU4MEBJANCNFSM5OQM5PUQ>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
@davidkuhta The swiftshader crap is going to take a bit to get going, so I reckon let's just merge this one in for now and we'll kick the can down the road on the other stuff. I'll create a PR now! |
Description
Our CI is good, but it could be better.
The complex thing here is #164, which we'll handle in a separate issue.
TODO
The text was updated successfully, but these errors were encountered: