Skip to content

Commit

Permalink
Merge pull request #2 from n7space/feature-github-actions
Browse files Browse the repository at this point in the history
GitHub CI Actions
  • Loading branch information
Lurkerpas authored Aug 10, 2020
2 parents 2ff0039 + b537b36 commit 60d2579
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 697 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Workflow
on: [push, pull_request]

jobs:
build-and-test:
runs-on: ubuntu-latest
name: Build and test
steps:

- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
submodules: recursive

- name: Build
run: make

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: adac-ubuntu-tar-gz
path: build/adac.tar.gz

release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
name: Release
needs: build-and-test
steps:

- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: adac-ubuntu-tar-gz

- name: Get the version
id: get_version
run: |
echo ::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- name: Rename
run: |
cp adac.tar.gz adac-${{ steps.get_version.outputs.VERSION }}.tar.gz
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.TAG_NAME }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
body: |
Initial release
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./adac-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_name: adac-linux-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_content_type: application/gzip
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ ARG MSP430_INSTALL_DIR=${TOOLS_DIR}/msp430-gcc

# Basic utilities
RUN apt-get update && apt-get install -y \
cmake \
g++ \
gcc \
cmake=3.13.4-1build1 \
g++=4:9.2.1-3.1ubuntu1 \
gcc=4:9.2.1-3.1ubuntu1 \
git \
git-lfs

Expand All @@ -47,13 +47,13 @@ RUN mkdir -p ${HOME_DIR} && \

# LLVM
RUN apt-get update && apt-get install -y \
clang \
llvm-dev
clang=1:9.0-49~exp1 \
llvm-dev=1:9.0-49~exp1

# GNAT
RUN apt-get update && apt-get install -y \
gnat \
gprbuild
gnat=8.0.1ubuntu1 \
gprbuild=2018-6

# MSP430-GCC
COPY tools/${MSP430_INSTALLER} ${TOOLS_DIR}
Expand Down
Loading

0 comments on commit 60d2579

Please sign in to comment.