Skip to content

Bump tokio from 1.41.0 to 1.41.1 #450

Bump tokio from 1.41.0 to 1.41.1

Bump tokio from 1.41.0 to 1.41.1 #450

Workflow file for this run

name: Rust
on:
pull_request:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run verify-version.sh
if: startsWith(github.ref, 'refs/tags/')
run: chmod +x scripts/verify-version.sh && scripts/verify-version.sh
- name: Setup
run: |
sudo apt-get update
sudo apt-get install -y mariadb-client
- name: Databases
run: docker compose up -d
- name: Run tests
run: cargo test --verbose
build-binary:
needs: [test]
strategy:
matrix:
include:
- os: linux
image: ubuntu-latest
arch: 386
setup: |
sudo apt-get install -qq gcc-i686-linux-gnu
sudo apt-get install -qq libssl-dev
sudo apt-get install -qq gcc-multilib
env: {}
- os: linux
image: ubuntu-latest
arch: amd64
env: {}
- os: linux
image: ubuntu-latest
arch: arm
setup: |
sudo apt-get install -qq gcc-arm-linux-gnueabi
sudo apt-get install -qq libssl-dev
env:
TARGET: aarch64-unknown-linux-gnu
- os: linux
image: ubuntu-latest
arch: arm64
setup: |
sudo apt-get install -qq gcc-aarch64-linux-gnu
sudo apt-get install -qq libssl-dev
env:
TARGET: aarch64-unknown-linux-gnu
- os: macos
image: macos-latest
arch: amd64
env:
TARGET: aarch64-apple-darwin
- os: macos
image: macos-latest
arch: arm64
env:
TARGET: x86_64h-apple-darwin
- os: windows
image: windows-latest
arch: amd64
env:
CC: cl.exe
CFLAGS: -x
TARGET: x86_64-pc-windows-msvc
name: Build (${{ matrix.os }}/${{ matrix.arch }})
runs-on: ${{ matrix.image }}
env: ${{ matrix.env }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup environment
run: ${{ matrix.setup }}
- name: Install compiler for Windows
if: ${{matrix.os == 'windows'}}
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
compiler: latest
- if: ${{matrix.os == 'windows'}}
name: Setup MSVC
uses: ilammy/[email protected]
- name: Build
run: cargo build --release --verbose
- name: Rename package
if: ${{matrix.os != 'windows'}}
shell: bash
run: |
cp target/release/geni geni-${{matrix.os}}-${{matrix.arch}}
- name: Rename package
if: ${{matrix.os == 'windows'}}
shell: bash
run: |
cp target/release/geni.exe geni-${{matrix.os}}-${{matrix.arch}}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
path: geni-${{matrix.os}}-${{matrix.arch}}
- name: Publish to release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: 'geni*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-cargo:
needs: [build-binary]
runs-on: "ubuntu-latest"
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "main"
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Crates.io Login
run: cargo login ${{secrets.CRATES_TOKEN}}
- name: Install cargo release
run: cargo install cargo-release
- name: Change tag name
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Publish version
run: cargo publish
test-github-actions:
runs-on: ubuntu-latest
needs: [build-binary]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Databases
run: docker compose up -d
- name: create test migrations
run: bash scripts/test-migrations.sh
- name: Test migrations
uses: emilpriver/geni@main
with:
database_url: "mariadb://root:password@localhost:3307/development"