From 0b4494c105914739d2f4bfc342fb6df5783565a4 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 30 Nov 2020 17:02:58 +0000 Subject: [PATCH] Updating GHES workflows --- automation/stale.yml | 2 +- ci/ada.yml | 24 ++ ci/blank.yml | 27 +- ci/cmake.yml | 46 +++ ci/dart.yml | 33 +- ci/dotnet-core.yml | 2 +- ci/go.yml | 5 +- ci/ios.yml | 42 +++ ci/maven.yml | 2 +- ci/npm-publish.yml | 4 +- ci/properties/ada.properties.json | 6 + ci/properties/cmake.properties.json | 6 + ci/properties/ios.properties.json | 9 + icons/ada.svg | 283 ++++++++++++++++ icons/cmake.svg | 493 ++++++++++++++++++++++++++++ icons/xcode.svg | 1 + 16 files changed, 958 insertions(+), 27 deletions(-) create mode 100644 ci/ada.yml create mode 100644 ci/cmake.yml create mode 100644 ci/ios.yml create mode 100644 ci/properties/ada.properties.json create mode 100644 ci/properties/cmake.properties.json create mode 100644 ci/properties/ios.properties.json create mode 100644 icons/ada.svg create mode 100644 icons/cmake.svg create mode 100644 icons/xcode.svg diff --git a/automation/stale.yml b/automation/stale.yml index 3404517..b671fc0 100644 --- a/automation/stale.yml +++ b/automation/stale.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/stale@v1 + - uses: actions/stale@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'Stale issue message' diff --git a/ci/ada.yml b/ci/ada.yml new file mode 100644 index 0000000..a27902a --- /dev/null +++ b/ci/ada.yml @@ -0,0 +1,24 @@ +name: Ada (GNAT) + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up GNAT toolchain + run: > + sudo apt-get update && + sudo apt-get install gnat gprbuild + + - name: Build + run: gprbuild -j0 -p diff --git a/ci/blank.yml b/ci/blank.yml index 72f1f16..3214287 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -2,14 +2,17 @@ name: CI -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the $default-branch branch +# Controls when the action will run. on: + # Triggers the workflow on push or pull request events but only for the $default-branch branch push: branches: [ $default-branch ] pull_request: branches: [ $default-branch ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" @@ -19,15 +22,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo Hello, world! + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! - # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. diff --git a/ci/cmake.yml b/ci/cmake.yml new file mode 100644 index 0000000..d521769 --- /dev/null +++ b/ci/cmake.yml @@ -0,0 +1,46 @@ +name: CMake + +on: [push] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally + # well on Windows or Mac. You can convert this to a matrix build if you need + # cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Create Build Environment + # Some projects don't allow in-source building, so create a separate build directory + # We'll use this as our working directory for all subsequent commands + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + # Use a bash shell so we can use the same syntax for environment variable + # access regardless of the host operating system + shell: bash + working-directory: ${{runner.workspace}}/build + # Note the current convention is to use the -S and -B options here to specify source + # and build directories, but this is only available with CMake 3.13 and higher. + # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + # Execute the build. You can specify a specific target with "--target " + run: cmake --build . --config $BUILD_TYPE + + - name: Test + working-directory: ${{runner.workspace}}/build + shell: bash + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C $BUILD_TYPE diff --git a/ci/dart.yml b/ci/dart.yml index 6e1b2e3..138921f 100644 --- a/ci/dart.yml +++ b/ci/dart.yml @@ -1,4 +1,4 @@ -name: Dart CI +name: Dart on: push: @@ -8,15 +8,34 @@ on: jobs: build: - runs-on: ubuntu-latest + # Note that this workflow uses the latest stable version of the Dart SDK. + # Docker images for other release channels - like dev and beta - are also + # available. See https://hub.docker.com/r/google/dart/ for the available + # images. container: image: google/dart:latest steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: pub get - - name: Run tests - run: pub run test + - uses: actions/checkout@v2 + + - name: Print Dart SDK version + run: dart --version + + - name: Install dependencies + run: dart pub get + + # Uncomment this step to verify the use of 'dart format' on each commit. + # - name: Verify formatting + # run: dart format --output=none --set-exit-if-changed . + + # Consider passing '--fatal-infos' for slightly stricter analysis. + - name: Analyze project source + run: dart analyze + + # Your project will need to have tests in test/ and a dependency on + # package:test for this step to succeed. Note that Flutter projects will + # want to change this to 'flutter test'. + - name: Run tests + run: dart test diff --git a/ci/dotnet-core.yml b/ci/dotnet-core.yml index 03958b6..9ee1a7d 100644 --- a/ci/dotnet-core.yml +++ b/ci/dotnet-core.yml @@ -16,7 +16,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.101 + dotnet-version: 3.1.301 - name: Install dependencies run: dotnet restore - name: Build diff --git a/ci/go.yml b/ci/go.yml index 3fa9348..16bff70 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -17,7 +17,6 @@ jobs: uses: actions/setup-go@v2 with: go-version: ^1.13 - id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 @@ -31,7 +30,7 @@ jobs: fi - name: Build - run: go build -v . + run: go build -v ./... - name: Test - run: go test -v . + run: go test -v ./... diff --git a/ci/ios.yml b/ci/ios.yml new file mode 100644 index 0000000..64b14a3 --- /dev/null +++ b/ci/ios.yml @@ -0,0 +1,42 @@ +name: iOS starter workflow + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + name: Build and Test default scheme using any available iPhone simulator + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + - name: Build + env: + scheme: ${{ 'default' }} + platform: ${{ 'iOS Simulator' }} + run: | + device=`instruments -s -devices | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'` + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" + - name: Test + env: + scheme: ${{ 'default' }} + platform: ${{ 'iOS Simulator' }} + run: | + device=`instruments -s -devices | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'` + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" diff --git a/ci/maven.yml b/ci/maven.yml index 367b842..a46556a 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -21,4 +21,4 @@ jobs: with: java-version: 1.8 - name: Build with Maven - run: mvn --batch-mode --update-snapshots verify + run: mvn -B package --file pom.xml diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index aa47c4e..b460edc 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -30,7 +30,7 @@ jobs: - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + NODE_AUTH_TOKEN: ${{secrets.npm_token}} publish-gpr: needs: build @@ -40,7 +40,7 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 12 - registry-url: https://npm.pkg.github.com/ + registry-url: $registry-url(npm) - run: npm ci - run: npm publish env: diff --git a/ci/properties/ada.properties.json b/ci/properties/ada.properties.json new file mode 100644 index 0000000..71021d0 --- /dev/null +++ b/ci/properties/ada.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Ada", + "description": "Build Ada project with GPRbuild.", + "iconName": "ada", + "categories": ["Ada"] +} diff --git a/ci/properties/cmake.properties.json b/ci/properties/cmake.properties.json new file mode 100644 index 0000000..ac001c3 --- /dev/null +++ b/ci/properties/cmake.properties.json @@ -0,0 +1,6 @@ +{ + "name": "CMake based projects", + "description": "Build and test a CMake based project.", + "iconName": "cmake", + "categories": ["C", "C++"] +} \ No newline at end of file diff --git a/ci/properties/ios.properties.json b/ci/properties/ios.properties.json new file mode 100644 index 0000000..0b3a9ed --- /dev/null +++ b/ci/properties/ios.properties.json @@ -0,0 +1,9 @@ +{ + "name": "iOS", + "description": "Build and test an iOS application using xcodebuild and any available iPhone simulator.", + "iconName": "xcode", + "categories": [ + "iOS", + "Xcode" + ] +} diff --git a/icons/ada.svg b/icons/ada.svg new file mode 100644 index 0000000..6a0d58f --- /dev/null +++ b/icons/ada.svg @@ -0,0 +1,283 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/icons/cmake.svg b/icons/cmake.svg new file mode 100644 index 0000000..254fe01 --- /dev/null +++ b/icons/cmake.svg @@ -0,0 +1,493 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/xcode.svg b/icons/xcode.svg new file mode 100644 index 0000000..a09ea44 --- /dev/null +++ b/icons/xcode.svg @@ -0,0 +1 @@ + \ No newline at end of file