Reference - https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
sudo apt-get install libgtest-dev
sudo apt-get install cmake # install cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
| enum StringOrInt: Codable { | |
| case string(String) | |
| case int(Int) | |
| init(from decoder: Decoder) throws { | |
| let container = try decoder.singleValueContainer() | |
| if let value = try? container.decode(Int.self) { | |
| self = .int(value) | |
| return | |
| } |
Reference - https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
sudo apt-get install libgtest-dev
sudo apt-get install cmake # install cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
| export $(cat .env.dev | xargs) |
| name: Nightly Build | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0,12 * * *' | |
| jobs: | |
| nightly-build: | |
| uses: ./.github/workflows/tag-builds.yml | |
| secrets: inherit |
| name: Tag Builds | |
| on: | |
| workflow_call: | |
| jobs: | |
| tag-builds: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: |
| name: build-upload | |
| on: | |
| push: | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+-[0-9]+-Debug' | |
| - '[0-9]+.[0-9]+.[0-9]+-[0-9]+-Release' |
| jobs: | |
| build-upload: | |
| runs-on: macos-12 | |
| steps: | |
| - name: Check base ref | |
| id: check-base-ref | |
| run: | | |
| REF=${{ github.event.base_ref }} | |
| if ! [[ $REF =~ ^refs/heads/(main|release/.*)$ ]]; then | |
| echo "Deployments via tagging must be done against the main or release branch"; |
| - name: Inject slug/short variables | |
| uses: rlespinasse/[email protected] |
| - name: Archive and Export | |
| id: build-archive-export | |
| run: ./scripts/build-archive-export.sh | |
| env: | |
| SLUG: ${{ env.GITHUB_REF_SLUG_CS }} |
| #Slug format is version-build-configuration | |
| VERSION_NUMBER=${SLUG%%-*} | |
| BUILD_AND_VERSION=${SLUG#*-} | |
| BUILD_NUMBER=${BUILD_AND_VERSION%%-*} | |
| BUILD_CONFIGURATION=${SLUG##*-} | |
| if ! [[ "$BUILD_CONFIGURATION" =~ ^(Debug|Release)$ ]]; then | |
| echo "INVALID CONFIGURATION: " $BUILD_CONFIGURATION | |
| exit 1 | |
| fi |