-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #684 from umarcor/ci/txt
ci: add 'releasing/supported_bases.txt'
- Loading branch information
Showing
12 changed files
with
322 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Copyright 2021 The Verible Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from pathlib import Path | ||
|
||
matrix = [] | ||
|
||
with (Path(__file__).parent.resolve().parent.parent / 'releasing' / 'supported_bases.txt').open('r') as fptr: | ||
for items in [line.strip().split(':') for line in fptr.readlines()]: | ||
matrix.append({ | ||
'os': items[0], | ||
'ver': items[1] | ||
}) | ||
|
||
print('::set-output name=matrix::' + str(matrix)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
pull_request: | ||
|
||
env: | ||
DOCKER_BUILDKIT: 1 | ||
BOT_USER: "Deployment Bot" | ||
BOT_EMAIL: "[email protected]" | ||
|
||
|
@@ -15,6 +16,7 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
|
@@ -41,7 +43,9 @@ jobs: | |
env: | ||
MODE: ${{ matrix.mode }} | ||
name: Check · ${{ matrix.mode }} | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
|
@@ -84,6 +88,7 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
|
@@ -116,21 +121,24 @@ jobs: | |
source ./.github/settings.sh | ||
./.github/workflows/run-kythe.sh | ||
- name: Upload Kythe output | ||
- name: 📤 Upload Kythe output | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: verible-kythe-index | ||
path: kythe_output/*.kzip | ||
|
||
|
||
Matrix: | ||
runs-on: ubuntu-latest | ||
name: Generate Build matrix | ||
outputs: | ||
matrix: ${{ steps.generate.outputs.matrix }} | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- id: generate | ||
run: ./.github/workflows/generate_matrix.sh | ||
run: ./.github/workflows/generate-matrix.py | ||
|
||
|
||
Build: | ||
|
@@ -140,22 +148,24 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
include: ${{ fromJson(needs.Matrix.outputs.matrix) }} | ||
name: Build · ${{ matrix.os }} ${{ matrix.version }} | ||
env: | ||
MATRIX_OS: '${{ matrix.os }}:${{ matrix.ver }}' | ||
name: 'Build · ${{ matrix.os }}:${{ matrix.ver }}' | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
# Download complete repository + tags | ||
fetch-depth: 0 | ||
|
||
- run: docker pull ${{ matrix.os }}:${{ matrix.version }} | ||
- run: docker pull $MATRIX_OS | ||
|
||
- name: Main script | ||
run: | | ||
set -x | ||
source ./.github/settings.sh | ||
cd releasing | ||
./docker-run.sh ${{ matrix.os }}-${{ matrix.version }} | ||
./releasing/docker-run.sh $MATRIX_OS | ||
- name: 📤 Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
|
@@ -167,6 +177,7 @@ jobs: | |
needs: [ Check, Build ] | ||
runs-on: ubuntu-20.04 | ||
name: 📦 Release | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
@@ -177,7 +188,7 @@ jobs: | |
- name: 📥 Download artifacts | ||
uses: actions/download-artifact@v2 | ||
|
||
- name: After success | ||
- name: Generate and apply TAG | ||
run: | | ||
git config --local user.name "$BOT_USER" | ||
git config --local user.email "$BOT_EMAIL" | ||
|
@@ -190,7 +201,7 @@ jobs: | |
ls -lah artifact | ||
- name: Deployment | ||
- name: Deploy release and assets | ||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Oops, something went wrong.