Post release: updating version to 0.14.4 #661
Workflow file for this run
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
name: commit | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, macos-latest, windows-2019] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: arduino/setup-protoc@v2 | |
with: | |
version: "23.1" | |
repo-token: ${{ secrets.DEV_GITHUB_TOKEN }} | |
- uses: dtolnay/[email protected] | |
with: | |
components: clippy | |
- uses: actions/github-script@v6 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '') | |
- name: Env | |
run: | | |
env|sort | |
- name: Build and run tests on windows | |
if: runner.os == 'Windows' | |
shell: pwsh | |
run: | | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | |
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression | |
scoop install sccache | |
# Set environment variables | |
$env:SCCACHE_GHA_ENABLED = "on" | |
$env:RUSTC_WRAPPER = (Get-Command sccache).Source | |
$env:XET_GLOBAL_DEDUP_POLICY = "never" | |
# Change directory and build the Rust project | |
cd rust | |
cargo build --verbose --profile=opt-test | |
# Configure Git global settings | |
git config --global user.email "[email protected]" | |
git config --global user.name "XetData Automation" | |
cargo test --profile=opt-test | |
# Run intergration tests | |
cd .. | |
cd gitxet/ | |
cargo build --verbose --profile=opt-test | |
cargo test --profile=opt-test | |
- name: Lint (Linux only) | |
if: runner.os == 'Linux' | |
run: | | |
cd rust | |
cargo clippy -r --verbose -- -D warnings # elevates warnings to errors | |
- name: Build | |
if: runner.os != 'Windows' | |
shell: bash | |
run: | | |
set +x | |
export RUST_BACKTRACE=1 | |
cd rust | |
if [ $RUNNER_OS = 'macOS' ]; then | |
brew install openssl@3 | |
# Upgrading make is required for cargo to play nicely with building openssl | |
brew install make | |
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH" | |
fi | |
cargo build --verbose --features "strict openssl_vendored" | |
- name: Test Environment | |
if: runner.os != 'Windows' | |
shell: bash | |
run: | | |
set +x | |
if [ $RUNNER_OS = 'macOS' ]; then | |
brew install md5sha1sum | |
fi | |
cd rust | |
# we need a basic git configuration for the tests to pass | |
git config --global user.email [email protected] | |
git config --global user.name "XetData Automation" | |
- name: Test | |
if: runner.os != 'Windows' | |
shell: bash | |
run: | | |
set +x | |
export RUST_BACKTRACE=1 | |
cd rust | |
cargo test --no-fail-fast --features "strict openssl_vendored" | |
- name: Integration tests | |
if: runner.os != 'Windows' | |
shell: bash | |
run: | | |
set +x | |
export RUST_BACKTRACE=1 | |
cd gitxet | |
cargo test --no-fail-fast --features "openssl_vendored" |