# iOS CircleCI 2.1 configuration file
version: 2.1
jobs:
  build:
    macos:
      xcode: "9.4.0"

    steps:
      - checkout

      - run:
          name: Set timezone and check current datetime
          command: |
            sudo systemsetup -settimezone Europe/Warsaw
            echo "Today is $(date +"%Y-%m-%d %T")"

      - run:
          name: Install gcc5
          command: |
            HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc5

      - run:
          name: Build vpcs
          command: |
            cd src && ./mk.sh amd64

      - run:
          name: Gather artifacts
          command: |
            mkdir artifacts
            mv src/vpcs artifacts/vpcs-osx

      - store_artifacts:
          path: artifacts
          destination: artifacts

      - run:
          name: Upload nightly builds to SF
          command: |
            if [ -n "${RUN_NIGHTLY_BUILD}" ]; then
              ssh-keyscan -H frs.sourceforge.net >> ~/.ssh/known_hosts
              echo "mkdir \"/home/frs/project/gns-3/Nightly Builds/$(date +"%Y-%m-%d")/\"" | sftp gns3build@frs.sourceforge.net
              echo -ne "
                cd \"/home/frs/project/gns-3/Nightly Builds/$(date +"%Y-%m-%d")/\"
                put \"artifacts/vpcs-osx\"
              " | sftp gns3build@frs.sourceforge.net
            fi


# iOS CircleCI 2.1 configuration file
version: 2.1
jobs:
  build:
    macos:
      xcode: "10.1.0"

    steps:
      - checkout

      - run:
          name: Set timezone and check current datetime
          command: |
            sudo systemsetup -settimezone Europe/Warsaw
            echo "Today is $(date +"%Y-%m-%d %T")"

      - run:
          name: Install gcc
          command: |
            HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc

      - run:
          name: Build vpcs
          command: |
            cd src && ./mk.sh amd64

      - run:
          name: Gather artifacts
          command: |
            mkdir artifacts
            mv src/vpcs artifacts/vpcs-osx

      - store_artifacts:
          path: artifacts
          destination: artifacts

      - run:
          name: Upload nightly builds to SF
          command: |
            if [ -n "${RUN_NIGHTLY_BUILD}" ]; then
              ssh-keyscan -H frs.sourceforge.net >> ~/.ssh/known_hosts
              echo "mkdir \"/home/frs/project/gns-3/Nightly Builds/$(date +"%Y-%m-%d")/\"" | sftp gns3build@frs.sourceforge.net
              echo -ne "
                cd \"/home/frs/project/gns-3/Nightly Builds/$(date +"%Y-%m-%d")/\"
                put \"artifacts/vpcs-osx\"
              " | sftp gns3build@frs.sourceforge.net
            fi


Use latest version of GCC to build.
Use latest version of GCC to build.
