-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI to gitlatb. Removes action/checkout. Back to github action/checkout. First true intent at CI. Second intent. Test 3. Test 4. Test 5 Test 6. Rework order of builds. Better settings of "continue-on-action". TEst des targets. Better cache config. Nothing, just change hash. Store artifacts. Use other os for true. Test upload artefact on windows. Save doc in artifacts. Change name of job.
- Loading branch information
1 parent
636add4
commit 8b0e975
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: full | ||
|
||
jobs: | ||
build_and_test: | ||
name: Check, compile, run and doc - ${{matrix.os}} - ${{matrix.toolchain}} | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
toolchain: [stable] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install rust (${{matrix.os}}-${{matrix.toolchain}}) | ||
run: rustup update ${{matrix.toolchain}} && rustup default ${{matrix.toolchain}} | ||
- name: Cache cargo registry | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cargo | ||
key: ${{runner.os}}-cargo-registry-${{github.sha}} | ||
restore-keys: ${{runner.os}}-cargo-registry- | ||
- name: Cache cargo target | ||
uses: actions/cache@v4 | ||
with: | ||
path: target | ||
key: ${{ runner.os }}-cargo-target-${{github.sha}} | ||
restore-keys: ${{runner.os}}-cargo-target- | ||
- name: fmt | ||
continue-on-error: true | ||
run: cargo fmt --check | ||
- name: clippy | ||
continue-on-error: true | ||
run: cargo clippy -- -D warnings | ||
- name: Build debug | ||
run: cargo build | ||
- name: build release | ||
run: cargo build --release | ||
- name: Save executable | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{matrix.os}}-qsharp-alice-bob-resource-estimator | ||
path: target/release/qsharp-alice-bob-resource-estimator${{ runner.os == 'Windows' && '.exe' || ''}} | ||
- name: test | ||
run: cargo test | ||
- name: example elliptic_log | ||
run: cargo run --example=elliptic_log | ||
- name: example from_qsharp | ||
run: cargo run --example=from_qsharp | ||
- name: doc | ||
run: cargo doc --release --no-deps | ||
- name: Save doc | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{matrix.os}}-doc | ||
path: target/doc |