From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7840) id 8FA633846035; Fri, 16 Apr 2021 20:36:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FA633846035 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Eugene Rozenfeld To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/microsoft/heads/main)] Add LICENSE.txt file and update README (#39) X-Act-Checkin: gcc X-Git-Author: vitong <53017530+vitong@users.noreply.github.com> X-Git-Refname: refs/vendors/microsoft/heads/main X-Git-Oldrev: ff046e366cfe82197ae69ed74a4a865aa514e9c7 X-Git-Newrev: 6acced3e4e5a84569f3b4f18fe052c34ab98502d Message-Id: <20210416203641.8FA633846035@sourceware.org> Date: Fri, 16 Apr 2021 20:36:41 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 20:36:41 -0000 https://gcc.gnu.org/g:6acced3e4e5a84569f3b4f18fe052c34ab98502d commit 6acced3e4e5a84569f3b4f18fe052c34ab98502d Author: vitong <53017530+vitong@users.noreply.github.com> Date: Tue Mar 2 10:48:28 2021 -0800 Add LICENSE.txt file and update README (#39) - Add a LICENSE.txt file under the .github directory for our scripts and workflows - Update the README file to contain more information about the repository Diff: --- .github/LICENSE.txt | 21 +++++++++++++++++++++ .github/scripts/build-gcc.sh | 2 +- .github/scripts/downloadBuildArtifact.py | 8 ++++---- .github/scripts/test-gcc.sh | 2 +- README.md | 28 +++++++++++++++++++++++++++- 5 files changed, 54 insertions(+), 7 deletions(-) diff --git a/.github/LICENSE.txt b/.github/LICENSE.txt new file mode 100644 index 00000000000..63447fd8bbb --- /dev/null +++ b/.github/LICENSE.txt @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/.github/scripts/build-gcc.sh b/.github/scripts/build-gcc.sh index 66cb914e8c4..7614a88daa2 100644 --- a/.github/scripts/build-gcc.sh +++ b/.github/scripts/build-gcc.sh @@ -1,6 +1,6 @@ cd ../objdir -$PWD/../test-gcc/configure --prefix=$HOME/GCC --enable-languages=c,c++ +$PWD/../gcc/configure --prefix=$HOME/GCC --enable-languages=c,c++ exit_code=$? if [ $exit_code != 0 ]; then diff --git a/.github/scripts/downloadBuildArtifact.py b/.github/scripts/downloadBuildArtifact.py index 51405afad54..0406442b479 100644 --- a/.github/scripts/downloadBuildArtifact.py +++ b/.github/scripts/downloadBuildArtifact.py @@ -17,7 +17,7 @@ def WaitOnGccBuild(commit, accessToken): logger.info("Looking for a gcc build for " + commit) reqArgs = {'check_name': GetGccBuildName()} - res = requests.get("https://api.github.com/repos/microsoft/test-gcc/commits/" + commit + "/check-runs", params=reqArgs, headers={'Authorization': "token " + accessToken}) + res = requests.get("https://api.github.com/repos/microsoft/gcc/commits/" + commit + "/check-runs", params=reqArgs, headers={'Authorization': "token " + accessToken}) checkruns = res.json()['check_runs'] count = 0 @@ -41,7 +41,7 @@ def WaitOnGccBuild(commit, accessToken): buildStatus = '' while True: # Get the run ID - res = requests.get("https://api.github.com/repos/microsoft/test-gcc/actions/jobs/" + str(latestBuildId), headers={'Authorization': "token " + accessToken}) + res = requests.get("https://api.github.com/repos/microsoft/gcc/actions/jobs/" + str(latestBuildId), headers={'Authorization': "token " + accessToken}) jobJson = res.json() workflowRunID = jobJson['run_id'] buildStatus = jobJson['status'] @@ -64,7 +64,7 @@ def WaitOnGccBuild(commit, accessToken): numArtifactRetries = 60 # Add error checking for the number of artifacts while True: - res = requests.get("https://api.github.com/repos/microsoft/test-gcc/actions/runs/" + str(workflowRunID) + "/artifacts", headers={'Authorization': "token " + accessToken}) + res = requests.get("https://api.github.com/repos/microsoft/gcc/actions/runs/" + str(workflowRunID) + "/artifacts", headers={'Authorization': "token " + accessToken}) logger.debug("Artifact Json:" + json.dumps(res.json())) @@ -96,7 +96,7 @@ def DownloadBuildArtifact(): logger = GetLogger() gccBuildArtifactID = globals.configObj.gccBuildArtifactID # TODO: Support downloading build artifact without a config object setup so the script can be used outside of workflows by developers - res = requests.get("https://api.github.com/repos/microsoft/test-gcc/actions/artifacts/" + str(gccBuildArtifactID) +"/zip", headers={'Authorization': "token " + globals.configObj.accessToken}) + res = requests.get("https://api.github.com/repos/microsoft/gcc/actions/artifacts/" + str(gccBuildArtifactID) +"/zip", headers={'Authorization': "token " + globals.configObj.accessToken}) logger.info("Downloading gccBuild zip from artifact ID" + str(gccBuildArtifactID)) with open('gccBuild.zip', 'wb') as f: diff --git a/.github/scripts/test-gcc.sh b/.github/scripts/test-gcc.sh index e73820e26b2..1ccfc396eb6 100644 --- a/.github/scripts/test-gcc.sh +++ b/.github/scripts/test-gcc.sh @@ -3,7 +3,7 @@ cd ../objdir chmod +x $PWD -R make -k $1 -j$(nproc) #RUNTESTFLAGS="-v -v" -../test-gcc/contrib/testsuite-management/validate_failures.py +../gcc/contrib/testsuite-management/validate_failures.py exit_code=$? if [ $exit_code != 0 ]; then diff --git a/README.md b/README.md index ef3c2bd5d85..ea89b56b65f 100644 --- a/README.md +++ b/README.md @@ -1 +1,27 @@ -TODO: Create a file called LICENSE (not LICENSE.TXT, LICENSE.md, etc.)… \ No newline at end of file +# microsoft/gcc + +This repository is a fork of the [GCC repository](https://gcc.gnu.org/git/gcc.git) for Microsoft internal scenarios. **Consumption of packages produced in this repo for any other scenario is not recommended or supported.** + +Integration from the upstream GCC repository will occur regularly. Changes made in this repository will be contributed back upstream through the [existing GCC contribution process](https://gcc.gnu.org/contribute.html). PR requests from the external community will not be accepted as this repository isn't meant to be another mechanism to check into the GCC repository. + +This repository also contains scripts and workflow YAML files to build and test GCC using GitHub Actions. See [Scripts and Workflows](#scripts-and-workflows) for more details. + +## Active Branches: + +| Branch | Status | Description | +| --- | --- | --- | +| current | [![current Status](https://github.com/microsoft/gcc/actions/workflows/build/badge.svg?branch=current)](https://github.com/microsoft/gcc/actions?query=workflow%3Abuild+branch%3Acurrent) | Points to the [master branch](https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/heads/master) in the upstream GCC repository. This will be updated regularly. +| gcc-9.1.0 | [![gcc-9.1.0 Status](https://github.com/microsoft/gcc/actions/workflows/build/badge.svg?branch=gcc-9.1.0)](https://github.com/microsoft/gcc/actions?query=workflow%3Abuild+branch%3Agcc-9.1.0) | Points to [releases/gcc-9.1.0 tag](https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=releases/gcc-9.1.0) in the upstream GCC repository. + +## Scripts and Workflows: + +Scripts and YAML files under the [.github](.github) directory leverage GitHub Actions to build and test GCC in PR and CI builds. These are available for anyone to use ([released under an MIT license](.github/LICENSE.txt)). The host and target of the workflows is **x86_64-pc-linux-gnu**. Future improvements will come to build on more hosts for more targets. + +| Workflow | Description | +| --- | --- | +| [build.yaml](.github/workflows/build.yaml) | Builds GCC | +| [test-gcc.yaml](.github/workflows/test-gcc.yaml) | Runs GCC tests in parallel across multiple machines | + +## Releases: +*For Microsoft internal scenarios consumption only. TBD with more details* +