-
Notifications
You must be signed in to change notification settings - Fork 11
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 #70 from slaclab/pre-release
Release Candidate v3.5.2
- Loading branch information
Showing
3 changed files
with
164 additions
and
124 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,163 @@ | ||
# ---------------------------------------------------------------------------- | ||
# Title : AXI Pcie Core GitHub Actions CI Script | ||
# ---------------------------------------------------------------------------- | ||
# This file is part of the 'AXI PCIE Core standard library'. It is subject to | ||
# the license terms in the LICENSE.txt file found in the top-level directory | ||
# of this distribution and at: | ||
# https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. | ||
# No part of the 'AXI PCIE Core standard library', including this file, may be | ||
# copied, modified, propagated, or distributed except according to the terms | ||
# contained in the LICENSE.txt file. | ||
# ---------------------------------------------------------------------------- | ||
# The following environment variables are required for this process: | ||
# secrets.GH_TOKEN | ||
# secrets.CONDA_UPLOAD_TOKEN_DEV | ||
# secrets.CONDA_UPLOAD_TOKEN_TAG | ||
|
||
name: AXI-PCIE Core Integration | ||
on: [push] | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
|
||
# This step checks out a copy of your repository. | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
- name: Python Syntax Check | ||
run: | | ||
python -m compileall -f python/ | ||
flake8 --count python/ | ||
gen_release: | ||
name: Generate Release | ||
runs-on: ubuntu-20.04 | ||
needs: [test] | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Get Image Information | ||
id: get_image_info | ||
run: | | ||
echo ::set-output name=tag::`git describe --tags` | ||
- name: Get Ruckus | ||
run: | | ||
git clone https://github.com/slaclab/ruckus.git | ||
python -m pip install --upgrade pip | ||
pip install -r ruckus/scripts/pip_requirements.txt | ||
- name: Gen Release | ||
env: | ||
TRAVIS_REPO_SLUG: ${{ github.repository }} | ||
TRAVIS_TAG: ${{ steps.get_image_info.outputs.tag }} | ||
GH_REPO_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: | | ||
python ruckus/scripts/releaseGen.py | ||
conda_build: | ||
name: Anaconda Build | ||
needs: [test] | ||
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/pre-release' | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-20.04 | ||
- macos-10.15 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
|
||
# This step checks out a copy of your repository. | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Setup anaconda | ||
env: | ||
OS_NAME: ${{ matrix.os }} | ||
run: | | ||
cd ${HOME} | ||
if [ $OS_NAME == "macos-10.15" ] | ||
then | ||
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh | ||
else | ||
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
fi | ||
bash miniconda.sh -b -p ${HOME}/miniconda | ||
export PATH="${HOME}/miniconda/bin:$PATH" | ||
source ${HOME}/miniconda/etc/profile.d/conda.sh | ||
conda config --set always_yes yes | ||
conda install conda-build anaconda-client conda-verify | ||
if [ $OS_NAME == "macos-10.15" ] | ||
then | ||
conda install libiconv libarchive -c conda-forge | ||
fi | ||
conda update -q conda conda-build | ||
conda update --all | ||
- name: Setup MacOS | ||
if: matrix.os == 'macos-10.15' | ||
run: | | ||
cd ${HOME} | ||
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.xz | ||
tar xzf MacOSX10.15.sdk.tar.xz | ||
sudo mkdir -p /opt/ | ||
sudo mv MacOSX10.15.sdk /opt/ | ||
CONDA_BUILD_SYSROOT=/opt/MacOSX10.15.sdk | ||
CONDA_BUILD=1 | ||
echo "CONDA_BUILD_SYSROOT=$CONDA_BUILD_SYSROOT" >> $GITHUB_ENV | ||
echo "CONDA_BUILD=$CONDA_BUILD" >> $GITHUB_ENV | ||
- name: Get Image Information | ||
id: get_image_info | ||
env: | ||
CONDA_UPLOAD_TOKEN_DEV: ${{ secrets.CONDA_UPLOAD_TOKEN_DEV }} | ||
CONDA_UPLOAD_TOKEN_TAG: ${{ secrets.CONDA_UPLOAD_TOKEN_TAG }} | ||
OS_NAME: ${{ matrix.os }} | ||
run: | | ||
if [ ${GITHUB_REF} == "refs/heads/pre-release" ] | ||
then | ||
echo ::set-output name=token::$CONDA_UPLOAD_TOKEN_DEV | ||
else | ||
echo ::set-output name=token::$CONDA_UPLOAD_TOKEN_TAG | ||
fi | ||
if [ ${OS_NAME} == "macos-10.15" ] | ||
then | ||
echo ::set-output name=os::osx-64 | ||
else | ||
echo ::set-output name=os::linux-64 | ||
fi | ||
- name: Build And Upload | ||
run: | | ||
export PATH="${HOME}/miniconda/bin:$PATH" | ||
source ${HOME}/miniconda/etc/profile.d/conda.sh | ||
conda build --debug conda-recipe --output-folder bld-dir -c tidair-tag -c tidair-packages -c conda-forge | ||
anaconda -t ${{ steps.get_image_info.outputs.token }} upload bld-dir/${{ steps.get_image_info.outputs.os }}/*.tar.bz2 | ||
This file was deleted.
Oops, something went wrong.
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