mirror of https://github.com/xacrimon/dashmap
cross stuff.
This commit is contained in:
parent
d41b5fc3e9
commit
16872c0be1
|
@ -0,0 +1,73 @@
|
|||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: style
|
||||
run: cargo fmt -- --check
|
||||
- name: clippy
|
||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
target: [
|
||||
x86_64-unknown-linux-gnu,
|
||||
i686-unknown-linux-gnu,
|
||||
aarch64-unknown-linux-gnu,
|
||||
armv7-linux-androideabi,
|
||||
powerpc-unknown-linux-gnu,
|
||||
wasm32-unknown-emscripten
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: setup
|
||||
run: |
|
||||
# install misc packages
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
|
||||
|
||||
# --
|
||||
|
||||
# add podman ppa
|
||||
|
||||
. /etc/os-release
|
||||
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
|
||||
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
|
||||
|
||||
# --
|
||||
|
||||
# add docker ppa
|
||||
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
|
||||
|
||||
# --
|
||||
|
||||
# install packages
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install docker-ce podman
|
||||
|
||||
# --
|
||||
|
||||
# configure docker permissions
|
||||
|
||||
sudo usermod -aG docker ${USER}
|
||||
su - ${USER}
|
||||
|
||||
# --
|
||||
|
||||
# install cross
|
||||
|
||||
cargo install cross
|
||||
|
||||
# --
|
||||
- name: test
|
||||
run: cross test --target ${{ matrix.target }}
|
|
@ -1,61 +0,0 @@
|
|||
name: Rust
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: style
|
||||
run: cargo fmt -- --check
|
||||
- name: clippy
|
||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
test-amd64:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: test
|
||||
run: cargo test
|
||||
|
||||
test-i686:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: setup
|
||||
run: |
|
||||
sudo apt-get install -y gcc-multilib
|
||||
rustup target add i686-unknown-linux-gnu
|
||||
- name: test
|
||||
run: cargo test --target i686-unknown-linux-gnu
|
||||
|
||||
test-aarch64:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: uraimo/run-on-arch-action@v1.0.9
|
||||
id: test
|
||||
with:
|
||||
architecture: aarch64
|
||||
distribution: ubuntu18.04
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y gcc &>> output.txt
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y &>> output.txt
|
||||
cargo test &>> output.txt
|
||||
echo ::set-output name=test::$(cat output.txt | base64 -w 0)
|
||||
- name: test
|
||||
run: |
|
||||
output='${{ steps.test.outputs.test }}'
|
||||
sudo echo $prev_output > output.txt
|
||||
sudo base64 -d output.txt
|
||||
|
||||
build-wasm32:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: setup
|
||||
run: rustup target add wasm32-unknown-unknown
|
||||
- name: build
|
||||
run: cargo build --target wasm32-unknown-unknown
|
Loading…
Reference in New Issue