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

[ci] Check macos #48

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
eea231f
Update subsystem-benchmarks.yml
mordamax Sep 10, 2024
5f2a5c3
add name
mordamax Sep 10, 2024
d32918a
Update subsystem-benchmarks.yml
mordamax Sep 10, 2024
dd43261
Update subsystem-benchmarks.yml
mordamax Sep 10, 2024
ddd6f11
Update subsystem-benchmarks.yml
mordamax Sep 10, 2024
d932ef4
Update subsystem-benchmarks.yml
mordamax Sep 10, 2024
1d180c7
Update subsystem-benchmarks.yml
mordamax Sep 10, 2024
7c39b1b
Update subsystem-benchmarks.yml
mordamax Sep 10, 2024
9c91a50
Update subsystem-benchmarks.yml
mordamax Sep 11, 2024
d63a057
Merge branch 'master' into mak-subsystem-bench-publishing
mordamax Sep 11, 2024
63c3236
Update subsystem-benchmarks.yml
mordamax Sep 11, 2024
2931616
Update subsystem-benchmarks.yml
mordamax Sep 11, 2024
d4c5ecf
[pallet-contracts] Remove riscv support (#5665)
pgherveou Sep 11, 2024
2ba268a
Merge branch 'paritytech:master' into master
alvicsam Sep 11, 2024
8e173dc
[ci] Check macos
alvicsam Sep 11, 2024
3121b84
brew
alvicsam Sep 11, 2024
614ffbf
collect debug
alvicsam Sep 11, 2024
b8df9db
specify version
alvicsam Sep 11, 2024
13efa50
try other option
alvicsam Sep 11, 2024
3ea2b16
rm labeled
alvicsam Sep 11, 2024
ccb05a2
debug
alvicsam Sep 11, 2024
cd17a12
temporary hack
alvicsam Sep 11, 2024
2b93754
move PATH setter
alvicsam Sep 12, 2024
adb2f14
fix conflict
alvicsam Sep 12, 2024
67fb70f
debug
alvicsam Sep 12, 2024
1226eee
path
alvicsam Sep 12, 2024
eba848b
try actions
alvicsam Sep 12, 2024
43ac842
fix ver
alvicsam Sep 12, 2024
2a8bcb9
which cargo
alvicsam Sep 12, 2024
66c5deb
install specific version
alvicsam Sep 12, 2024
e07a6b0
fix
alvicsam Sep 12, 2024
f7f1fb3
final preps
alvicsam Sep 12, 2024
07c54d3
fix name
alvicsam Sep 12, 2024
2c1f56f
nightly?
alvicsam Sep 12, 2024
1f58114
some more deps
alvicsam Sep 12, 2024
4bdedbd
try latest nightly
alvicsam Sep 12, 2024
265f15d
revert
alvicsam Sep 12, 2024
a390222
rm comments
alvicsam Sep 12, 2024
d00148d
more components
alvicsam Sep 12, 2024
4d90ea8
it must be fine now
alvicsam Sep 12, 2024
96cfa0a
debug
alvicsam Sep 12, 2024
2fd126f
debug output
alvicsam Sep 12, 2024
819901f
fix version
alvicsam Sep 12, 2024
caf815e
fix bash
alvicsam Sep 12, 2024
da99b71
waaaa
alvicsam Sep 12, 2024
9e44e1f
set version in main job
alvicsam Sep 12, 2024
2a0e7ce
add debug info
alvicsam Sep 12, 2024
f96156d
rm nightly
alvicsam Sep 12, 2024
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
3 changes: 3 additions & 0 deletions .github/actions/set-up-mac/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ inputs:
runs:
using: "composite"
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install with Hombrew
shell: bash
run: brew install protobuf rustup openssl pkg-config zlib xz zstd llvm jq curl gcc make cmake
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/check-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: checks MacOS

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
cargo-check-each-crate-macos:
runs-on: macOS
env:
SKIP_WASM_BUILD: 1
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set rust version from env file
run: |
RUST_VERSION=$(cat .github/env | sed -E 's/.*ci-unified:([^-]+)-([^-]+).*/\2/')
echo $RUST_VERSION
echo "RUST_VERSION=${RUST_VERSION}" >> $GITHUB_ENV
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@1ccc07ccd54b6048295516a3eb89b192c35057dc # master from 12.09.2024
- uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc # v1.9.0
with:
cache: false
toolchain: ${{ env.RUST_VERSION }}
target: wasm32-unknown-unknown
components: cargo, clippy, rust-docs, rust-src, rustfmt, rustc, rust-std
- name: Install protobuf
run: brew install protobuf
- name: cargo info
run: |
echo "######## rustup show ########"
rustup show
echo "######## cargo --version ########"
cargo --version
- name: Run cargo check
run: cargo check --workspace --locked
127 changes: 74 additions & 53 deletions .github/workflows/subsystem-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Subsystem Benchmarks

on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

concurrency:
Expand All @@ -29,19 +31,31 @@ jobs:

build:
timeout-minutes: 80
needs: [ set-image ]
needs: [set-image]
runs-on: arc-runners-polkadot-sdk-benchmark
container:
image: ${{ needs.set-image.outputs.IMAGE }}
strategy:
fail-fast: false
matrix:
features: [
{ name: "polkadot-availability-recovery", bench: "availability-recovery-regression-bench" },
{ name: "polkadot-availability-distribution", bench: "availability-distribution-regression-bench" },
{ name: "polkadot-node-core-approval-voting", bench: "approval-voting-regression-bench" },
{ name: "polkadot-statement-distribution", bench: "statement-distribution-regression-bench" }
]
{
name: "polkadot-availability-recovery",
bench: "availability-recovery-regression-bench",
},
# {
# name: "polkadot-availability-distribution",
# bench: "availability-distribution-regression-bench",
# },
# {
# name: "polkadot-node-core-approval-voting",
# bench: "approval-voting-regression-bench",
# },
{
name: "polkadot-statement-distribution",
bench: "statement-distribution-regression-bench",
},
]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -56,81 +70,88 @@ jobs:
run: |
forklift cargo bench -p ${{ matrix.features.name }} --bench ${{ matrix.features.bench }} --features subsystem-benchmarks || echo "Benchmarks failed"
ls -lsa ./charts
mkdir ./artifacts
cp ./charts/${{ matrix.features.bench }}.json ./artifacts/${{ matrix.features.bench }}.json

- name: Upload artifacts
uses: actions/[email protected]
with:
name: ${{matrix.features.bench}}
path: ./artifacts
path: ./charts

publish-benchmarks:
timeout-minutes: 60
needs: [ build ]
needs: [build]
if: github.ref == 'refs/heads/master'
environment: subsystem-benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
fetch-depth: 0

- name: Download artifacts
uses: actions/[email protected]
with:
path: ./artifacts
path: ./charts

- name: Setup git
- name: Setup git & copy artifacts
run: |
# Fixes "detected dubious ownership" error in the ci
git config --global --add safe.directory '*'
ls -lsR ./artifacts
ls -lsR ./charts
benchmarks=(
"availability-recovery-regression-bench"
"statement-distribution-regression-bench"
"approval-voting-regression-bench"
"statement-distribution-regression-bench"
)
for bench in "${benchmarks[@]}"; do
cp -r "./charts/${bench}.json" ./bench/${bench} || echo "Failed to copy ${bench}"
done

- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.POLKADOTSDK_GHPAGES_APP_ID }}
private-key: ${{ secrets.POLKADOTSDK_GHPAGES_APP_KEY }}

- name: Publish ${{ env.BENCH_NAME }}
uses: benchmark-action/github-action-benchmark@v1
- name: Generate ${{ env.BENCH }}
env:
BENCH_NAME: availability-recovery-regression-bench
with:
tool: "customSmallerIsBetter"
name: ${{ env.BENCH_NAME }}
output-file-path: ./artifacts/${{ env.BENCH_NAME }}/${{ env.BENCH_NAME }}.json
benchmark-data-dir-path: ./artifacts/${{ env.BENCH_NAME }}
github-token: ${{ steps.app-token.outputs.token }}

- name: Publish ${{ env.BENCH_NAME }}
BENCH: availability-recovery-regression-bench
uses: benchmark-action/github-action-benchmark@v1
env:
BENCH_NAME: availability-distribution-regression-bench
with:
tool: "customSmallerIsBetter"
name: ${{ env.BENCH_NAME }}
output-file-path: ./artifacts/${{ env.BENCH_NAME }}/${{ env.BENCH_NAME }}.json
benchmark-data-dir-path: ./artifacts/${{ env.BENCH_NAME }}
github-token: ${{ steps.app-token.outputs.token }}
name: ${{ env.BENCH }}
output-file-path: ./bench/${{ env.BENCH }}/${{ env.BENCH }}.json
benchmark-data-dir-path: ./bench/${{ env.BENCH }}
auto-push: false

- name: Publish ${{ env.BENCH_NAME }}
uses: benchmark-action/github-action-benchmark@v1
- name: Generate ${{ env.BENCH }}
env:
BENCH_NAME: approval-voting-regression-bench
BENCH: statement-distribution-regression-bench
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "customSmallerIsBetter"
name: ${{ env.BENCH_NAME }}
output-file-path: ./artifacts/${{ env.BENCH_NAME }}/${{ env.BENCH_NAME }}.json
benchmark-data-dir-path: ./artifacts/${{ env.BENCH_NAME }}
github-token: ${{ steps.app-token.outputs.token }}
name: ${{ env.BENCH }}
output-file-path: ./bench/${{ env.BENCH }}/${{ env.BENCH }}.json
benchmark-data-dir-path: ./bench/${{ env.BENCH }}
auto-push: false

- name: Publish ${{ env.BENCH_NAME }}
uses: benchmark-action/github-action-benchmark@v1
env:
BENCH_NAME: statement-distribution-regression-bench
- run: |
ls -lsaR ./bench
ls -lsaR ./charts
git status
git diff

- uses: actions/create-github-app-token@v1
id: app-token
with:
tool: "customSmallerIsBetter"
name: ${{ env.BENCH_NAME }}
output-file-path: ./artifacts/${{ env.BENCH_NAME }}/${{ env.BENCH_NAME }}.json
benchmark-data-dir-path: ./artifacts/${{ env.BENCH_NAME }}
github-token: ${{ steps.app-token.outputs.token }}
app-id: ${{ secrets.POLKADOTSDK_GHPAGES_APP_ID }}
private-key: ${{ secrets.POLKADOTSDK_GHPAGES_APP_KEY }}

- name: Push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git remote remove origin
git remote add origin https://${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}
git status
git diff
git add .
git commit -m "Update subsystem benchmarks"
git push --set-upstream origin gh-pages
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading