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: 🔄 Synced file(s) with ordo-one/public-repository-templates #2

Merged
merged 4 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
ci: 🔄 Synced local '.github/workflows/' with remote 'workflows/swift'
  • Loading branch information
ordo-ci committed Nov 17, 2022
commit a987356afdb612e865640548560e992ee6b89c77
21 changes: 17 additions & 4 deletions .github/workflows/swift-benchmark-delta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,29 @@ jobs:

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

steps:
- uses: actions/checkout@v3
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: 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
#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
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
- name: Run benchmarks for PR branch
Expand Down Expand Up @@ -71,5 +84,5 @@ jobs:
comment_includes: "Pull request benchmark comparison [${{ matrix.os }}] with"
- name: Exit with correct status
run: |
/usr/bin/ordo-performance powersave
#/usr/bin/ordo-performance powersave
exit ${{ env.exitStatus }}
20 changes: 11 additions & 9 deletions .github/workflows/swift-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ on:
branches: [ main ]
jobs:
test-code-coverage:
runs-on: [swift-latest, ubuntu-latest, self-hosted]
runs-on: [ubuntu-22.04]
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- name: Git URL token override
run: git config --global url."https://ordo-ci:${{ secrets.CI_MACHINE_PAT }}@github.com".insteadOf "https://github.com"

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

- name: Run tests
continue-on-error: true
run: |
[ -d Tests ] && swift test --parallel --enable-code-coverage
# - name: Extract default SPM library testtarget
# id: spm_test_target
# run: |
# SPM_DEFAULT_TEST_TARGET=$(swift package dump-package | jq -r '.targets | .[] | select(.type == "test") | .name' | tail -1)
# echo "spmlibrarytesttarget=${SPM_DEFAULT_TEST_TARGET}" >> $GITHUB_ENV

- name: Export code coverage
run: |
xctest_binary=".build/debug/${{ github.event.repository.name }}PackageTests.xctest"
Expand All @@ -31,8 +32,9 @@ jobs:
fi

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

- name: Upload codecov
uses: codecov/codecov-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swift-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
SwiftLint:
timeout-minutes: 60
runs-on: [self-hosted, swift-docker]
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint with --strict
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/swift-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [[swift-latest, ubuntu-latest, self-hosted], [swift-nightly, ubuntu-latest, self-hosted]]
os: [ubuntu-latest]

timeout-minutes: 60
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Git URL token override
run: git config --global url."https://ordo-ci:${{ secrets.CI_MACHINE_PAT }}@github.com".insteadOf "https://github.com"
- name: Ubuntu deps
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libjemalloc-dev

- name: Swift version
run: swift --version
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/swift-macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,19 @@ on:
jobs:
build-macos:
timeout-minutes: 60
runs-on: [self-hosted, macos-12]
runs-on: [macos-12]

steps:
- name: Wipe gitconfig
- name: Homebrew Mac
if: ${{ runner.os == 'Macos' }}
run: |
echo "" > ~/.gitconfig
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
brew install jemalloc
- uses: actions/checkout@v3
- name: Git URL token override
run: git config --global url."https://ordo-ci:${{ secrets.CI_MACHINE_PAT }}@github.com".insteadOf "https://github.com"
- name: Swift version
run: swift --version
- name: Build
run: swift build
- name: Run tests
run: |
[ -d Tests ] && swift test --parallel
- name: Wipe gitconfig
run: echo "" > ~/.gitconfig
19 changes: 8 additions & 11 deletions .github/workflows/swift-sanitizer-address.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,23 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [[swift-latest, ubuntu-latest, self-hosted], [swift-nightly, ubuntu-latest, self-hosted], [macos-12, self-hosted]]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
# Needed otherwise xcode git hangs on checkout
- name: Wipe gitconfig Mac
- name: Homebrew Mac
if: ${{ runner.os == 'Macos' }}
run: |
echo "" > ~/.gitconfig
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
brew install jemalloc

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

- name: Git URL token override
run: git config --global url."https://ordo-ci:${{ secrets.CI_MACHINE_PAT }}@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v3

- name: Swift version
run: swift --version
Expand All @@ -44,7 +45,3 @@ jobs:

- name: Run address sanitizer on release build
run: swift test --sanitize=address -c release -Xswiftc -enable-testing | swift demangle

- name: Wipe gitconfig Mac
if: ${{ runner.os == 'Macos' }}
run: echo "" > ~/.gitconfig
19 changes: 8 additions & 11 deletions .github/workflows/swift-sanitizer-thread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,23 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [[swift-latest, ubuntu-latest, self-hosted], [swift-nightly, ubuntu-latest, self-hosted], [macos-12, self-hosted]]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
# Needed otherwise xcode git hangs on checkout
- name: Wipe gitconfig Mac
- name: Homebrew Mac
if: ${{ runner.os == 'Macos' }}
run: |
echo "" > ~/.gitconfig
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
brew install jemalloc

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

- name: Git URL token override
run: git config --global url."https://ordo-ci:${{ secrets.CI_MACHINE_PAT }}@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v3

- name: Swift version
run: swift --version
Expand All @@ -44,7 +45,3 @@ jobs:

- name: Run thread sanitizer on release build
run: swift test --sanitize=thread -c release -Xswiftc -enable-testing | swift demangle

- name: Wipe gitconfig Mac
if: ${{ runner.os == 'Macos' }}
run: echo "" > ~/.gitconfig