Skip to content

Commit

Permalink
feat: version 2.0.2
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Olivier <[email protected]>
  • Loading branch information
martin-olivier committed Oct 26, 2023
1 parent e342f8c commit aeaad14
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 311 deletions.
14 changes: 14 additions & 0 deletions .fpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-s dir vangelis README.md LICENSE
--name vangelis
--license MIT
--version 2.0.2
--description "A functional testing framework"
--url "https://github.com/martin-olivier/vangelis"
--maintainer "Martin Olivier <[email protected]>"

--provides vangelis
--conflicts vangelis

vangelis=/usr/bin/vangelis
README.md=/usr/share/doc/vangelis/README.md
LICENSE=/usr/share/doc/vangelis/LICENSE
68 changes: 33 additions & 35 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

linux:
name: linux (${{ matrix.arch_name }})
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions: write-all
needs: linter
strategy:
Expand All @@ -39,76 +39,74 @@ jobs:
include:
- arch: x86_64-unknown-linux-gnu
arch_name: x86_64
compiler: gcc-aarch64-linux-gnu
- arch: aarch64-unknown-linux-gnu
arch_name: arm64
arch_name: aarch64
compiler: gcc-aarch64-linux-gnu

steps:
- uses: actions/checkout@v3

- name: Install toolchain
run: rustup target add ${{ matrix.arch }}

- name: Install gcc
run: sudo apt install gcc-aarch64-linux-gnu
- name: Install build dependencies
run: >
sudo apt update && sudo apt install -y
${{ matrix.compiler }}
ruby
ruby-dev
rubygems
rpm
libarchive-tools
- name: Install fpm
run: sudo gem install fpm

- name: Build binary
run: cargo build --release --target=${{ matrix.arch }}

- name: Save binary artifact
uses: actions/upload-artifact@v3
with:
name: vangelis-linux-${{ matrix.arch_name }}
path: target/${{ matrix.arch }}/release/vangelis
if-no-files-found: error

- name: Set binary name
if: github.event_name == 'release'
run: cp target/${{ matrix.arch }}/release/vangelis vangelis-linux-${{ matrix.arch_name }}

- name: Upload binary
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: vangelis-linux-${{ matrix.arch_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install cargo-deb
run: cargo install cargo-deb
- name: Get binary
run: cp target/${{ matrix.arch }}/release/vangelis .

- name: Build debian package
run: cargo deb --target=${{ matrix.arch }} -o vangelis-debian-${{ matrix.arch_name }}.deb
run: fpm -t deb -p vangelis-debian-${{ matrix.arch_name }}.deb --architecture ${{ matrix.arch }}

- name: Save debian artifact
uses: actions/upload-artifact@v3
with:
name: vangelis-debian-${{ matrix.arch_name }}.deb
path: ./vangelis-debian-${{ matrix.arch_name }}.deb
if-no-files-found: error

- name: Install alien
run: sudo apt install alien

- name: Build redhat package
run: alien ./vangelis-debian-${{ matrix.arch_name }}.deb -k --to-rpm

- name: Set package name
run: mv *.rpm vangelis-redhat-${{ matrix.arch_name }}.rpm

run: fpm -t rpm -p vangelis-redhat-${{ matrix.arch_name }}.rpm --architecture ${{ matrix.arch }}

- name: Save redhat artifact
uses: actions/upload-artifact@v3
with:
name: vangelis-redhat-${{ matrix.arch_name }}.rpm
path: ./vangelis-redhat-${{ matrix.arch_name }}.rpm
if-no-files-found: error

- name: Build archlinux package
run: fpm -t pacman -p vangelis-archlinux-${{ matrix.arch_name }}.pkg.tar.zst --architecture ${{ matrix.arch }}

- name: Save archlinux artifact
uses: actions/upload-artifact@v3
with:
name: vangelis-archlinux-${{ matrix.arch_name }}.pkg.tar.zst
path: ./vangelis-archlinux-${{ matrix.arch_name }}.pkg.tar.zst
if-no-files-found: error

- name: Upload packages
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: |
./vangelis-debian-${{ matrix.arch_name }}.deb
./vangelis-redhat-${{ matrix.arch_name }}.rpm
./vangelis-archlinux-${{ matrix.arch_name }}.pkg.tar.zst
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -168,7 +166,7 @@ jobs:
- arch: x86_64-pc-windows-msvc
arch_name: x86_64
- arch: aarch64-pc-windows-msvc
arch_name: arm64
arch_name: aarch64

steps:
- uses: actions/checkout@v3
Expand Down
Loading

0 comments on commit aeaad14

Please sign in to comment.