[docker] Change permission of helper script in docker image #1635
Workflow file for this run
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
name: codechecker-pypi-package | |
# Triggers the workflow on 'push', 'pull' and 'release' request events. | |
# The pypi package will be published only on the release event. | |
on: | |
push: | |
pull_request: | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Build pypi package | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.6' | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install g++ gcc-multilib | |
- name: Get tag version | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') | |
id: get_version | |
run: | | |
echo ::set-output name=VERSION::$(echo ${GITHUB_REF#refs/tags/v} | sed 's/-//') | |
# Set package version information in the 'setup.py' file based on the | |
# released git tag information. | |
- name: Set version in the setup.py file | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') | |
run: | | |
sed -i "s/version=\".*\"/version=\"${{ steps.get_version.outputs.VERSION }}\"/" setup.py | |
- name: Create the pypi package | |
run: | | |
BUILD_UI_DIST=NO make dist | |
- uses: actions/upload-artifact@master | |
with: | |
name: pypi-package | |
path: | | |
dist | |
tests/functional/binary_package/ | |
test: | |
name: Install and test pypi package | |
runs-on: ${{ matrix.os }} | |
needs: build | |
strategy: | |
matrix: | |
os: [ubuntu-18.04, macos-10.15, windows-2019] | |
steps: | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.6' | |
- uses: actions/download-artifact@master | |
with: | |
name: pypi-package | |
path: ./ | |
- name: "Install run-time dependencies (Linux)" | |
if: ${{ matrix.os == 'ubuntu-18.04' }} | |
run: | |
sudo apt-get update && sudo apt-get install g++ clang clang-tidy | |
- name: "Install run-time dependencies (OSX)" | |
if: ${{ matrix.os == 'macos-10.15' }} | |
run: | |
brew install llvm | |
- name: "Install run-time dependencies (Windows)" | |
if: ${{ matrix.os == 'windows-2019' }} | |
shell: powershell | |
run: | | |
choco install llvm; | |
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: "Install pypi package" | |
shell: bash | |
run: | | |
pip install wheel nose | |
pip install dist/codechecker-*.tar.gz | |
- name: "Test CodeChecker commands" | |
run: | | |
nosetests tests/functional/binary_package/ | |
# Publish pypi package when a new CodeChecker version is released. | |
publish: | |
name: Publish pypi package | |
if: github.event_name == 'release' | |
runs-on: ubuntu-18.04 | |
needs: test | |
steps: | |
- uses: actions/download-artifact@master | |
with: | |
name: pypi-package | |
path: ./dist/ | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} |