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

chore: update CI workflows #24

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0245bc9
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Sep 7, 2023
7a2778d
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Sep 20, 2023
6056e26
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Sep 22, 2023
2ad0e89
ci: 🔄 created local '.github/actions/' from remote 'actions'
Sep 22, 2023
bbdc982
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Nov 20, 2023
0aaa0d0
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Nov 20, 2023
7ab5b39
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Nov 20, 2023
9e0031b
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Nov 28, 2023
2daa1dd
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Nov 29, 2023
a329d78
Merge branch 'HdrHistogram:main' into main
hassila Dec 18, 2023
8e12978
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Jan 4, 2024
e0ea4b0
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Jan 4, 2024
be87bdf
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Jan 10, 2024
9f1cb7a
ci: 🔄 synced local '.swiftlint.yml' with remote 'dotfiles/swiftlint.yml'
Jan 10, 2024
2ed9742
ci: 🔄 created local '.swiftlint_base.yml' from remote 'dotfiles/swift…
Jan 10, 2024
9ff6627
ci: 🔄 created local '.swiftlint_refinement.yml' from remote 'dotfiles…
Jan 10, 2024
6e9f6da
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Jan 24, 2024
b1a007f
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Feb 20, 2024
5286190
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Feb 21, 2024
070348a
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Mar 7, 2024
663c713
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Mar 25, 2024
77d63a9
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
May 22, 2024
a4e22e4
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Jun 11, 2024
a8aa3a4
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Jul 23, 2024
2f5a7ae
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Jul 24, 2024
5742a04
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Jul 25, 2024
15807b9
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Oct 1, 2024
86a7709
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Oct 2, 2024
5446e2b
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Oct 2, 2024
c69b032
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Oct 14, 2024
9d66f85
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Oct 14, 2024
9a339bd
Merge branch 'HdrHistogram:main' into main
freef4ll Nov 7, 2024
6a34372
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Nov 7, 2024
693d61e
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Nov 7, 2024
e98f9e0
ci: 🔄 synced local '.github/workflows/' with remote 'workflows/swift'
Nov 7, 2024
7842dca
Merge branch 'HdrHistogram:main' into main
freef4ll Nov 7, 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
13 changes: 13 additions & 0 deletions .github/actions/consul-start/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Start Consul"
runs:
using: "composite"
steps:
- uses: nahsi/setup-hashi-tool@v1
if: github.repository == 'ordo-one/package-consul' || github.repository == 'ordo-one/package-distributed-system'
with:
name: consul
- name: Start consul
if: github.repository == 'ordo-one/package-consul' || github.repository == 'ordo-one/package-distributed-system'
shell: bash
run: |
consul agent -dev -log-level=warn &
10 changes: 5 additions & 5 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
semantic-release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -52,14 +52,14 @@ jobs:
failTitle: false" > .releaserc.yml

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "lts/*"
node-version: '20'

- name: Install semantic-release
run: |
npm install semantic-release conventional-changelog-conventionalcommits -D

npm install semantic-release@v24 conventional-changelog-conventionalcommits@v8 -D
npm list
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
67 changes: 40 additions & 27 deletions .github/workflows/swift-benchmark-delta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,41 @@ on:

jobs:
benchmark-delta:

timeout-minutes: 30
runs-on: ${{ matrix.os }}
continue-on-error: true

strategy:
matrix:
#os: [[Linux, benchmark-swift-latest, self-hosted]]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Homebrew Mac
if: ${{ runner.os == 'Macos' }}
run: |
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
brew install jemalloc

- name: Ubuntu deps
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libjemalloc-dev

- name: Start consul
uses: ./.github/actions/consul-start
- name: Git URL token override and misc
run: |
#git config --global url."https://ordo-ci:${{ secrets.CI_MACHINE_PAT }}@github.com".insteadOf "https://github.com"
#/usr/bin/ordo-performance
[ -d Benchmarks ] && echo "hasBenchmark=1" >> $GITHUB_ENV
[ -f Benchmarks/Package.swift ] && echo "BENCHMARK_PACKAGE_PATH=--package-path Benchmarks" >> $GITHUB_ENV
echo "BENCHMARK_RUN_URL=https://github.com/ordo-one/${{ github.event.repository.name }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
- name: Run benchmarks for PR branch
if: ${{ env.hasBenchmark == '1' }}
run: |
swift package --allow-writing-to-directory .benchmarkBaselines/ benchmark baseline update pull_request --no-progress --quiet
echo "exitStatus=1" >> $GITHUB_ENV
swift package ${BENCHMARK_PACKAGE_PATH} --disable-sandbox benchmark baseline update pull_request --no-progress
- name: Switch to branch 'main'
if: ${{ env.hasBenchmark == '1' }}
run: |
Expand All @@ -50,39 +50,52 @@ jobs:
- name: Run benchmarks for branch 'main'
if: ${{ env.hasBenchmark == '1' }}
run: |
swift package --allow-writing-to-directory .benchmarkBaselines/ benchmark baseline update main --no-progress --quiet
swift package ${BENCHMARK_PACKAGE_PATH} --disable-sandbox benchmark baseline update main --no-progress
- name: Compare PR and main
if: ${{ env.hasBenchmark == '1' }}
id: benchmark
continue-on-error: true
run: |
echo $(date) >> $GITHUB_STEP_SUMMARY
echo "exitStatus=1" >> $GITHUB_ENV
swift package benchmark baseline check main pull_request --format markdown >> $GITHUB_STEP_SUMMARY
echo "exitStatus=0" >> $GITHUB_ENV
continue-on-error: true
swift package ${BENCHMARK_PACKAGE_PATH} benchmark baseline check main pull_request --format markdown >> $GITHUB_STEP_SUMMARY
echo "exitStatus=$?" >> $GITHUB_ENV
- if: ${{ env.exitStatus == '0' }}
name: Pull request comment text success
id: prtestsuccess
name: Pull request comment text same
run: |
echo 'PRTEST<<EOF' >> $GITHUB_ENV
echo "[Pull request benchmark comparison [${{ matrix.os }}] with 'main' run at $(date -Iseconds)](https://github.com/ordo-one/${{ github.event.repository.name }}/actions/runs/${{ github.run_id }})" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
{
echo "_Pull request is the same as baseline_"
echo "[Pull request benchmark comparison [${{ matrix.os }}] with 'main' run at $(date -Iseconds)]($BENCHMARK_RUN_URL)"
} > benchmark_comment
- if: ${{ env.exitStatus == '1' }}
name: Pull request comment text failure
id: prtestfailure
run: |
echo 'PRTEST<<EOF' >> $GITHUB_ENV
echo "[Pull request benchmark comparison [${{ matrix.os }}] with 'main' run at $(date -Iseconds)](https://github.com/ordo-one/${{ github.event.repository.name }}/actions/runs/${{ github.run_id }})" >> $GITHUB_ENV
echo "_Pull request had performance regressions_" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
{
echo "_Pull request had an unknown failure_"
echo "[Pull request benchmark comparison [${{ matrix.os }}] with 'main' run at $(date -Iseconds)]($BENCHMARK_RUN_URL)"
} > benchmark_comment
- if: ${{ env.exitStatus == '2' }}
name: Pull request comment text regression
run: |
{
echo "_Pull request had a regression_"
echo "[Pull request benchmark comparison [${{ matrix.os }}] with 'main' run at $(date -Iseconds)]($BENCHMARK_RUN_URL)"
} > benchmark_comment
- if: ${{ env.exitStatus == '4' }}
name: Pull request comment text improvement
run: |
{
echo "_Pull request had a performance improvement_"
echo "[Pull request benchmark comparison [${{ matrix.os }}] with 'main' run at $(date -Iseconds)]($BENCHMARK_RUN_URL)"
} > benchmark_comment
- name: Comment PR
if: ${{ env.hasBenchmark == '1' }}
uses: thollander/actions-comment-pull-request@v1
uses: thollander/actions-comment-pull-request@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: ${{ env.PRTEST }}
comment_includes: "Pull request benchmark comparison [${{ matrix.os }}] with"
github-token: ${{ secrets.GITHUB_TOKEN }}
file-path: benchmark_comment
comment-tag: 'Pull request benchmark comparison [${{ matrix.os }}] with'
- name: Exit with correct status
if: ${{ success() || failure() }}
run: |
#/usr/bin/ordo-performance powersave
exit ${{ env.exitStatus }}
2 changes: 1 addition & 1 deletion .github/workflows/swift-check-api-breaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ubuntu deps
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/swift-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, next ]
jobs:
test-code-coverage:
runs-on: [ubuntu-22.04]
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Ubuntu deps
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libjemalloc-dev llvm-15
sudo apt-get install -y libjemalloc-dev

- uses: khlopko/setup-swift@bfd61cbd14eeef55a27afc45138b61ced7174839

- name: Swift version
run: swift --version

- name: Start consul
uses: ./.github/actions/consul-start

- name: Run tests
continue-on-error: true
Expand All @@ -32,12 +40,12 @@ jobs:
fi

if [ -f ${xctest_binary} ]; then
llvm-cov-15 export -format="lcov" ${xctest_binary} -instr-profile .build/debug/codecov/default.profdata > info.lcov
llvm-cov export -format="lcov" ${xctest_binary} -instr-profile .build/debug/codecov/default.profdata > info.lcov
fi

- name: Upload codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_REPO_TOKEN }}
token: ${{ secrets.CODECOV_REPO_TOKEN }}
files: info.lcov
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/swift-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
timeout-minutes: 60
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: GitHub Action for SwiftLint with --strict
uses: norio-nomura/action-swiftlint@3.2.1
with:
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/swift-linux-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Swift Linux build
name: Linux build

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, next ]

jobs:
build-linux:
Expand All @@ -14,17 +14,20 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
swift: ["5.7", "5.8"]

# swift: [ "5.10", "6.0" ]

runs-on: ${{ matrix.os }}

steps:
- uses: fwal/setup-swift@v1.23.0
- uses: swift-actions/setup-swift@v2
if: ${{ false }}
with:
swift-version: ${{ matrix.swift }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Start consul
uses: ./.github/actions/consul-start

- name: Ubuntu deps
if: ${{ runner.os == 'Linux' }}
Expand All @@ -39,4 +42,6 @@ jobs:

- name: Run tests
run: |
[ -d Tests ] && swift test --parallel
if [ -d Tests ]; then
swift test --parallel
fi
24 changes: 18 additions & 6 deletions .github/workflows/swift-macos-build.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
name: Swift macOS build
name: macOS build

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, next ]

jobs:
build-macos:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [macos-13]
swift: ["5.7", "5.8"]
os: [macos-15]
# swift: [ "5.10", "6.0" ]

runs-on: ${{ matrix.os }}
# env:
# DEVELOPER_DIR: /Applications/Xcode_16.1.app/Contents/Developer

steps:
- uses: fwal/setup-swift@v1.24.0
- uses: swift-actions/setup-swift@v2
if: ${{ false }}
with:
swift-version: ${{ matrix.swift }}

Expand All @@ -29,7 +32,16 @@ jobs:
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
echo BENCHMARK_DISABLE_JEMALLOC=true >> $GITHUB_ENV
brew install jemalloc
- uses: actions/checkout@v3

- uses: actions/checkout@v4

- name: Start consul
uses: ./.github/actions/consul-start

- name: GH auth
run: |
echo "machine api.github.com login ${{ secrets.GITHUB_TOKEN }} password x-oauth-basic" > $HOME/.netrc
cat ~/.netrc
- name: Swift version
run: swift --version
- name: Build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/swift-outdated-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
runs-on: [ubuntu-latest]
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check Swift package dependencies
id: spm-dep-check
uses: MarcoEidinger/swift-package-dependencies-check@2.3.4
uses: MarcoEidinger/swift-package-dependencies-check@2.5.0
with:
isMutating: true
failWhenOutdated: false
- name: Create Pull Request
if: steps.spm-dep-check.outputs.outdatedDependencies == 'true'
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'chore: update package dependencies'
branch: updatePackageDepedencies
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/swift-sanitizer-address.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, next ]

jobs:
address-sanitizer:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os: [macos-15]

runs-on: ${{ matrix.os }}
timeout-minutes: 60
Expand All @@ -29,7 +29,10 @@ jobs:
run: |
sudo apt-get install -y libjemalloc-dev

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Start consul
uses: ./.github/actions/consul-start

- name: Swift version
run: swift --version
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/swift-sanitizer-thread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, next ]

jobs:
thread-sanitizer:
Expand All @@ -30,7 +30,10 @@ jobs:
sudo apt-get install -y libjemalloc-dev
echo BENCHMARK_DISABLE_JEMALLOC=true >> $GITHUB_ENV

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Start consul
uses: ./.github/actions/consul-start

- name: Swift version
run: swift --version
Expand Down
Loading
Loading