Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Revert "test: local test with act"
Browse files Browse the repository at this point in the history
This reverts commit c5c5b95.
  • Loading branch information
thoongnv committed Nov 21, 2023
1 parent 2de5172 commit 4e8fe07
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 57 deletions.
114 changes: 57 additions & 57 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: CI
on: push

jobs:
# format:
# name: Check Format
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Cargo fmt
# run: cargo fmt --all -- --check
format:
name: Check Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cargo fmt
run: cargo fmt --all -- --check

test:
name: Test
Expand All @@ -26,24 +26,24 @@ jobs:
strategy:
fail-fast: false
matrix:
build: [linux-arm]
build: [linux, linux-arm, macos, macos-arm]
include:
# - build: linux
# os: ubuntu-latest
# rust: stable
# target: x86_64-unknown-linux-gnu
- build: linux
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
- build: linux-arm
os: ubuntu-latest
rust: stable
target: aarch64-unknown-linux-gnu
# - build: macos
# os: macos-latest
# rust: stable
# target: x86_64-apple-darwin
# - build: macos-arm
# os: ubuntu-20.04
# rust: stable
# target: aarch64-apple-darwin
- build: macos
os: macos-latest
rust: stable
target: x86_64-apple-darwin
- build: macos-arm
os: ubuntu-20.04
rust: stable
target: aarch64-apple-darwin
# - build: windows
# os: windows-latest
# rust: stable
Expand All @@ -57,35 +57,35 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

# - name: Install Rust
# uses: actions-rs/toolchain@v1
# with:
# toolchain: ${{ matrix.rust }}
# profile: minimal
# override: true
# target: ${{ matrix.target }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
target: ${{ matrix.target }}

# - name: Login to GitHub Container Registry
# if: matrix.build == 'macos-arm' || matrix.build == 'windows-arm'
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GH_REGISTRY_TOKEN }}
- name: Login to GitHub Container Registry
if: matrix.build == 'macos-arm' || matrix.build == 'windows-arm'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_REGISTRY_TOKEN }}

# - name: Use Cross
# shell: bash
# run: |
# cargo install cross
# echo "CARGO=cross" >> $GITHUB_ENV
# echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
# echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
- name: Use Cross
shell: bash
run: |
cargo install cross
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
# - name: Show command used for Cargo
# run: |
# echo "cargo command is: ${{ env.CARGO }}"
# echo "target flag is: ${{ env.TARGET_FLAGS }}"
# echo "target dir is: ${{ env.TARGET_DIR }}"
- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"
echo "target flag is: ${{ env.TARGET_FLAGS }}"
echo "target dir is: ${{ env.TARGET_DIR }}"
# - name: Install Linux ARM toolchain
# if: matrix.build == 'linux-arm'
Expand Down Expand Up @@ -128,15 +128,15 @@ jobs:
# sudo apt install libgcc-s1:arm64 gcc g++ libc6-dev libclang-dev pkg-config libstd-rust-dev:arm64 gcc-aarch64-linux-gnu qemu-user -y
# rustup target add aarch64-unknown-linux-gnu

# - name: Build
# run: ${{ env.CARGO }} build --verbose ${{ env.TARGET_FLAGS }}
- name: Build
run: ${{ env.CARGO }} build --verbose ${{ env.TARGET_FLAGS }}

# - name: Run tests
# if: matrix.build != 'macos-arm'
# shell: bash
# run: |
# if [[ "${{ matrix.build }}" = "linux" || "${{ matrix.build }}" = "linux-arm" ]]; then
# cargo test ${{ env.TARGET_FLAGS }} -- --nocapture
# else
# ${{ env.CARGO }} test ${{ env.TARGET_FLAGS }} -- --nocapture
# fi
- name: Run tests
if: matrix.build != 'macos-arm'
shell: bash
run: |
if [[ "${{ matrix.build }}" = "linux" || "${{ matrix.build }}" = "linux-arm" ]]; then
cargo test ${{ env.TARGET_FLAGS }} -- --nocapture
else
${{ env.CARGO }} test ${{ env.TARGET_FLAGS }} -- --nocapture
fi
File renamed without changes.

0 comments on commit 4e8fe07

Please sign in to comment.