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

Add support for macOS runners #24

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
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
25 changes: 22 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ permissions: write-all

jobs:
run_system_tests:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os.runner }}
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: [{runner: 'ubuntu-latest'}, {runner: 'macos-14'}]
timeout-minutes: 500
steps:
- name: Get the current date
Expand Down Expand Up @@ -190,7 +195,14 @@ jobs:
env:
DATA_DIR: ${{ env.REPL_DATA_DIR }}
run: |
find $DATA_DIR -type f -name '*.txt' -exec sed -i '$ s/$/_replaced_obj_by_obj/' {} +
if [ "$RUNNER_OS" == "Linux" ]; then
find $DATA_DIR -type f -name '*.txt' -exec sed -i '$ s/$/_replaced_obj_by_obj/' {} +
elif [ "$RUNNER_OS" == "macOS" ]; then
find $DATA_DIR -type f -name '*.txt' -exec sed -i '' '$ s/$/_replaced_obj_by_obj/' {} +
else
echo "$RUNNER_OS not supported"
exit 1
fi

- name: Run gh-push-to-neofs with objects replacement
id: gh_push_to_neofs_with_replace_objects
Expand Down Expand Up @@ -253,7 +265,14 @@ jobs:
env:
DATA_DIR: ${{ env.REWRITE_CONT_DIR }}
run: |
find $DATA_DIR -type f -name '*.txt' -exec sed -i '$ s/$/_cont_rewrite/' {} +
if [ "$RUNNER_OS" == "Linux" ]; then
find $DATA_DIR -type f -name '*.txt' -exec sed -i '$ s/$/_cont_rewrite/' {} +
elif [ "$RUNNER_OS" == "macOS" ]; then
find $DATA_DIR -type f -name '*.txt' -exec sed -i '' '$ s/$/_cont_rewrite/' {} +
else
echo "$RUNNER_OS not supported"
exit 1
fi

- name: Run gh-push-to-neofs with objects replacement
id: gh_push_to_neofs_with_cont_rewrite
Expand Down
22 changes: 19 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,24 @@ outputs:
runs:
using: composite
steps:
- name: Download latest stable neofs-cli for uploading reports to NeoFS
- name: Download latest stable neofs-cli for uploading reports to NeoFS for Linux
uses: dsaltares/fetch-gh-release-asset@1.1.1
if: runner.os == 'Linux'
with:
repo: 'nspcc-dev/neofs-node'
version: 'tags/v0.38.1'
file: 'neofs-cli-amd64'
version: 'tags/v0.41.1'
file: 'neofs-cli-linux-amd64'
target: 'neofs/neofs-cli'

- name: Download latest stable neofs-cli for uploading reports to NeoFS for macOS
uses: dsaltares/fetch-gh-release-asset@1.1.1
if: runner.os == 'macOS'
with:
repo: 'nspcc-dev/neofs-node'
version: 'tags/v0.41.1'
file: 'neofs-cli-darwin-arm64'
target: 'neofs/neofs-cli'

- name: Chmod latest stable neofs-cli
shell: bash
run: |
Expand All @@ -84,6 +94,12 @@ runs:
run: |
echo "$NEOFS_WALLET" | base64 -d > "$GITHUB_ACTION_PATH/wallet.json"

- name: Install required package if running on macos
shell: bash
if: runner.os == 'macOS'
run: |
brew install libmagic

- name: Prepare venv
shell: bash
id: prepare_venv
Expand Down
Loading