-
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.
Update GH action to use dtolnay/rust-toolchain
- Loading branch information
Showing
2 changed files
with
41 additions
and
55 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 |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
# test-args: --no-fail-fast | ||
# test-args: --all-features | ||
# benches: true | ||
coverage: true | ||
coverage: false | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
|
@@ -56,10 +56,6 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
# - name: Install required packages | ||
# | ||
# run: sudo apt install -y inotify-tools ripgrep s3cmd | ||
|
||
- name: Install required packages | ||
run: | | ||
brew install --head s3cmd # 2.3.0 has a bug with Python 3.12 | ||
|
@@ -82,18 +78,13 @@ jobs: | |
run: ls -R $HOME/.ssh ; cat $HOME/.ssh/id_rsa ; cat $HOME/.ssh/config | ||
|
||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust || 'stable' }} | ||
profile: minimal | ||
components: llvm-tools-preview | ||
override: true | ||
components: llvm-tools-preview,llvm-cov | ||
|
||
- name: Build debug | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: ${{ matrix.build-args }} | ||
run: cargo build ${{ matrix.build-args }} | ||
env: | ||
RUSTFLAGS: "-A dead_code" | ||
|
||
|
@@ -111,34 +102,36 @@ jobs: | |
|
||
- name: Test | ||
if: matrix.coverage | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: ${{ matrix.test-args }} | ||
run: cargo test ${{ matrix.test-args }} | ||
env: | ||
CARGO_INCREMENTAL: "0" | ||
# To debug the output when commands fail | ||
TRYCMD: "dump" | ||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off" | ||
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off" | ||
# RUSTFLAGS: "-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off" | ||
RUSTFLAGS: "-Cinstrument-coverage" | ||
# RUSTDOCFLAGS: "-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off" | ||
# LLVM_PROFILE_FILE: "xvc-%p-%m.profraw" | ||
|
||
- name: Install cargo-llvm-cov | ||
if: matrix.coverage | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Coverage | ||
id: coverage | ||
if: matrix.coverage | ||
uses: actions-rs/[email protected] | ||
- name: Test all benches | ||
if: matrix.benches | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --benches ${{ matrix.features }} | ||
run: cargo llvm-cov --features ${{ matrix.features }} --workspace --lcov --output-path lcov.info | ||
|
||
- name: Upload to codecov.io | ||
if: matrix.coverage | ||
uses: codecov/codecov-action@v2 | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ${{ steps.coverage.outputs.report }} | ||
|
||
- name: Test all benches | ||
if: matrix.benches | ||
run: cargo test --benches ${{ matrix.features }} | ||
|
||
deploy-linux: | ||
name: deploy-linux | ||
# needs: [coverage] | ||
|
@@ -147,31 +140,28 @@ jobs: | |
strategy: | ||
matrix: | ||
target: [x86_64-unknown-linux-gnu] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
target: ${{ matrix.target }} | ||
targets: ${{ matrix.target }} | ||
|
||
- name: Build target | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: false | ||
command: build | ||
args: --release --target ${{ matrix.target }} --features=bundled-openssl | ||
run: cargo build --release --target ${{ matrix.target }} --features=bundled-openssl | ||
|
||
- name: Package | ||
shell: bash | ||
run: | | ||
#strip target/${{ matrix.target }}/release/xvc | ||
cd target/${{ matrix.target }}/release | ||
tar czvf ../../../xvc-${{ github.ref_name}}-${{ matrix.target }}.tar.gz xvc | ||
tar czvf ../../../xvc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz xvc | ||
cd - | ||
- name: Publish | ||
uses: softprops/action-gh-release@v1 | ||
# TODO: if any of the build step fails, the release should be deleted. | ||
|
@@ -191,20 +181,15 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
target: ${{ matrix.target }} | ||
targets: ${{ matrix.target }} | ||
|
||
- name: Build target | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: false | ||
command: build | ||
args: --release --target ${{ matrix.target }} --features bundled-sqlite | ||
run: cargo build --release --target ${{ matrix.target }} --features bundled-sqlite | ||
|
||
- name: Package | ||
shell: bash | ||
|
@@ -213,13 +198,15 @@ jobs: | |
cd target/${{ matrix.target }}/release | ||
tar czvf ../../../xvc-${{ github.ref_name}}-${{ matrix.target }}.tar.gz xvc | ||
cd - | ||
- name: Publish | ||
uses: softprops/action-gh-release@v1 | ||
# TODO: if any of the build step fails, the release should be deleted. | ||
with: | ||
files: "xvc*" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
deploy-macos: | ||
name: deploy-macos | ||
# needs: [coverage] | ||
|
@@ -228,23 +215,19 @@ jobs: | |
strategy: | ||
matrix: | ||
target: [x86_64-apple-darwin] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
target: ${{ matrix.target }} | ||
targets: ${{ matrix.target }} | ||
|
||
- name: Build target | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: false | ||
command: build | ||
args: --release --target ${{ matrix.target }} | ||
run: cargo build --release --target ${{ matrix.target }} | ||
|
||
- name: Package | ||
shell: bash | ||
|
@@ -253,6 +236,7 @@ jobs: | |
cd target/${{ matrix.target }}/release | ||
tar czvf ../../../xvc-${{ github.ref_name}}-${{ matrix.target }}.tar.gz xvc | ||
cd - | ||
- name: Publish | ||
uses: softprops/action-gh-release@v1 | ||
# TODO: if any of the build step fails, the release should be deleted. | ||
|
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