Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added CI workflow #3

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI
on:
pull_request:
branches: [ "main" ]
merge_group:
branches: [ "main" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: macos-latest
steps:
# HPX installation steps
- name: Install dependencies
run: brew install pkg-config hwloc llvm boost cmake ninja boost open-mpi asio swig
- name: Clone HPX
run: git clone https://github.com/STEllAR-GROUP/hpx.git
- name: Create install directory
run: mkdir $HOME/hpx-install
- name: Configure HPX
run: cd hpx && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=$HOME/hpx-install -DHPX_WITH_FETCH_ASIO=ON -DHPX_WITH_MALLOC=system -DHPX_WITH_PKGCONFIG=ON -DCMAKE_BUILD_TYPE=Release -DHPX_WITH_EXAMPLES=Off -DHPX_WITH_TESTS=Off ..
- name: Build HPX
run: cd /Users/runner/work/mac-l/mac-l/hpx/build && make -j
- name: Install HPX
run: cd /Users/runner/work/mac-l/mac-l/hpx/build && make install
- name: Check HPX installation
run: |
if [ -d ~/hpx-install/lib/pkgconfig ]; then
echo "HPX installation successful: lib/pkgconfig directory found"
else
echo "Error: lib/pkgconfig directory not found in HPX installation"
exit 1
fi

- uses: actions/checkout@v4
- name: Set PKG_CONFIG_PATH
run: echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/hpx-install/lib/pkgconfig" >> $GITHUB_ENV

- name: Set DYLD_LIBRARY_PATH
run: echo "DYLD_LIBRARY_PATH=$HOME/hpx-install/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Test hpx-rs
run: cargo check && cargo test
- name: Test hpx-sys
working-directory: hpx-sys
run: cargo check && cargo test

- name: Check formatting
run: cargo fmt -- --check