clang-format #824
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
paths-ignore: | |
- '.github/ISSUE_TEMPLATE/**' | |
- 'Docs/**' | |
- '**/*.md' | |
pull_request: | |
paths-ignore: | |
- '.github/ISSUE_TEMPLATE/**' | |
- 'Docs/**' | |
- '**/*.md' | |
workflow_dispatch: | |
env: | |
XC_VERSION: ${{ '16.2' }} | |
jobs: | |
unit-tests: | |
runs-on: macos-15 | |
strategy: | |
matrix: | |
configuration: ["Debug", "Release", "ASAN", "UBSAN"] | |
steps: | |
- name: Select the Xcode version | |
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" | |
- uses: actions/checkout@v4 | |
- name: Build and run unit tests | |
run: "cd Scripts && ./run_all_unit_tests.sh ${{ matrix.configuration }}" | |
integration-tests: | |
runs-on: macos-15 | |
steps: | |
- name: Select the Xcode version | |
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" | |
- name: Install the dependencies | |
run: | | |
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete | |
sudo rm -rf /Library/Frameworks/Python.framework/ | |
brew update | |
brew install qemu | |
brew install docker | |
brew install colima | |
# specifically install an outdated version of lima - 0.23.2 as with 1.0.1 there are network connectivity issues | |
brew uninstall --ignore-dependencies lima | |
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/45464b6c4788a80be3f131ab5e2a4468cdfa960c/Formula/l/lima.rb > lima.rb | |
brew install lima.rb | |
LIMACTL_PATH=$(brew --prefix)/bin/limactl | |
sudo curl -L -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/master/limactl && sudo chmod +x $LIMACTL_PATH | |
colima start --network-address --arch arm64 --vm-type=qemu | |
- uses: actions/checkout@v4 | |
- name: Work around GHA issue 7522 | |
run: | | |
# TODO: Replace this with a better solution. See https://github.com/actions/runner-images/issues/7522 | |
echo Killing XProtect...; sudo pkill -9 XProtect >/dev/null || true; | |
echo Waiting for XProtect process...; while pgrep XProtect; do sleep 3; done; | |
- name: Build and run unit tests | |
env: | |
NC_SENSITIVE: ${{ secrets.NC_SENSITIVE }} | |
run: | | |
echo -n "$NC_SENSITIVE" | base64 --decode -o /Users/runner/.nc_sensitive.h | |
cd Scripts && ./run_all_integration_tests.sh | |
clang-format: | |
runs-on: macos-15 | |
steps: | |
- name: Install the dependencies | |
run: | | |
brew update | |
brew install clang-format | |
- uses: actions/checkout@v4 | |
- name: Run clang-format | |
run: "cd Scripts && ./run_clang_format.sh --check" | |
clang-tidy: | |
runs-on: macos-15 | |
steps: | |
- name: Select the Xcode version | |
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" | |
- name: Install the dependencies | |
run: | | |
brew update | |
brew install llvm jq | |
- uses: actions/checkout@v4 | |
- name: Run clang-tidy | |
run: "cd Scripts && ./run_clang_tidy.sh --check" | |
build-unsigned: | |
runs-on: macos-15 | |
steps: | |
- name: Select the Xcode version | |
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" | |
- name: Install the dependencies | |
run: | | |
brew install create-dmg pandoc basictex | |
- uses: actions/checkout@v4 | |
- name: Build and package | |
run: | | |
eval "$(/usr/libexec/path_helper)" | |
cd Scripts && ./build_unsigned.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: nimble-commander-unsigned | |
path: Scripts/*.dmg | |
if-no-files-found: error |