Skip to content

ci

ci #659

Workflow file for this run

name: ci
on:
push:
pull_request:
schedule: [cron: "40 8 * * *"]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
# checklinks:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: trevyn/lychee-action@v1
# id: lychee
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# args: --verbose --no-progress --header="accept=text/html" "**/*.md" "**/*.rs" "**/*.json" "**/*.toml" "**/*.yml"
# - name: Fail if there were link-check errors
# run: exit ${{ steps.lychee.outputs.exit_code }}
test:
name: test ${{ matrix.os }} rust ${{ matrix.rust }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust: ["1.70", stable, beta, nightly]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "stable"
check-latest: true
cache: false
- run: go version
- run: rustup default ${{ matrix.rust }} && rustup update ${{ matrix.rust }}
- run: go mod vendor
working-directory: "librclone-sys"
- run: cargo test -- --nocapture
- run: cargo test -- --nocapture
working-directory: "librclone-sys"
- run: cargo doc --no-deps
- name: dry-run cargo publish librclone-sys
run: cargo publish --allow-dirty --no-verify --dry-run
working-directory: "librclone-sys"
- name: dry-run cargo publish librclone
run: cargo publish --no-verify --dry-run
publish:
needs: [test]
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, 'librclone@') && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "stable"
check-latest: true
cache: false
- run: go version
- run: rustup default stable && rustup update stable
- run: go mod vendor
working-directory: "librclone-sys"
- name: cargo publish librclone-sys
run: cargo publish --allow-dirty --no-verify --token ${{ secrets.CARGO_TOKEN }}
working-directory: "librclone-sys"
- name: cargo publish librclone
run: cargo publish --no-verify --token ${{ secrets.CARGO_TOKEN }}