Skip to content

Commit

Permalink
setting up CI to build the NC app
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekazakov committed Jan 19, 2024
1 parent 5356c7c commit 1b2523b
Showing 1 changed file with 50 additions and 5 deletions.
55 changes: 50 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Build and Test

on: [push, workflow_dispatch]

env:
XC_VERSION: ${{ '15.1' }}
CCACHE_COMPRESS: "true"
CCACHE_COMPRESSLEVEL: "10"
CCACHE_MAXSIZE: "400M"

jobs:

unit-tests:
runs-on: macos-13
env:
XC_VERSION: ${{ '15.1' }}
CCACHE_COMPRESS: "true"
CCACHE_COMPRESSLEVEL: "10"
CCACHE_MAXSIZE: "400M"
strategy:
matrix:
configuration: ["Debug", "Release", "ASAN"]
Expand Down Expand Up @@ -44,3 +48,44 @@ jobs:
echo "Done"
env:
GH_TOKEN: ${{ github.token }}

build-unsigned:
runs-on: macos-13
steps:
- name: Select latest Xcode
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app"
- name: Install deps
run: |
brew install ccache
brew install create-dmg
- name: Cache ccache
uses: actions/cache@v2
with:
path: ~/Library/Caches/ccache
key: ccache-${{ github.job }}-${{ github.run_id }}
restore-keys: ccache-${{ github.job }}
- uses: actions/checkout@v2
- name: Build and run unit tests
run: "cd Scripts && ./build_unsigned.sh"
- name: Show ccache stats
run: "ccache --show-stats --verbose"
- name: Remove old ccache caches
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeys=$(gh actions-cache list --key ccache-${{ github.job }}- | cut -f 1 )
# Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeys
do
gh actions-cache delete $cacheKey --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@v4
with:
name: my-artifact
path: Scripts/*.dmg
if-no-files-found: error

0 comments on commit 1b2523b

Please sign in to comment.