Skip to content

Commit

Permalink
Another try at CI
Browse files Browse the repository at this point in the history
  • Loading branch information
artemdinaburg committed Aug 8, 2020
1 parent 8357462 commit 629f0a8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
jobs:
VersionFile:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.bump.outputs.VERSION }}
steps:
- name: Bump Version Info For Release
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
- id: bump
name: Bump Version Info For Release
run: |
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest | jq -r '[.tag_name][0] | split(".") as $ver | $ver[-1]|tonumber as $last | $ver[:-1] as $first | $first + [$last+1] | map(tostring) | join(".")' > VERSION
echo "::set-output name=VERSION::$(<VERSION)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MacOS:
Expand Down Expand Up @@ -45,6 +48,7 @@ jobs:
${{ runner.os }}-llvm6
- name: Run Tests
run: |
echo ${{needs.VersionFile.outputs.version}} > VERSION
./scripts/travis.sh macos-latest initialize
./scripts/travis.sh macos-latest build
Docker_Linux:
Expand All @@ -58,6 +62,7 @@ jobs:
- uses: actions/checkout@v2
- name: Build LLVM ${{ matrix.llvm }} on ${{ matrix.ubuntu }}
run: |
echo ${{needs.VersionFile.outputs.version}} > VERSION
docker build . -t docker.pkg.github.com/lifting-bits/remill/llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest -f Dockerfile --build-arg UBUNTU_VERSION=${{ matrix.ubuntu }} --build-arg ARCH=amd64 --build-arg LLVM_VERSION=${{ matrix.llvm }}
- name: Test Remill with LLVM ${{ matrix.llvm }} on ${{ matrix.ubuntu }}
run: |
Expand Down Expand Up @@ -89,24 +94,19 @@ jobs:
name: remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64.tar.xz
path: artifacts/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64.tar.xz
windows:
needs: [VersionFile]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Run Tests
continue-on-error: true # for now
run: |
echo ${{needs.VersionFile.outputs.version}} > VERSION
scripts/travis.bat
CreateRelease:
needs: [macOS, Docker_Linux]
needs: [macOS, Docker_Linux, VersionFile]
runs-on: ubuntu-latest
steps:
- name: Increment Release Version
id: release_ver
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
echo "::set-output name=VERSION::$(<VERSION)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download all artifacts
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions/download-artifact@v2
Expand All @@ -119,7 +119,7 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.release_ver.outputs.VERSION }}
tag_name: ${{ needs.VersionFile.outputs.version }}
files: releases/*/*.xz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 629f0a8

Please sign in to comment.