Skip to content

Commit

Permalink
ci: check download binary location
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Nov 21, 2023
1 parent 00968fa commit f21aa67
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

jobs:

# ---------------------------------------------------------------------------
build:

runs-on: ubuntu-latest
Expand All @@ -37,26 +38,25 @@ jobs:
with:
toolchain: 1.74.0

# - name: install windows dependencies
# if: ${{ matrix.arch == 'x86_64-pc-windows-gnu' }}
# run: sudo apt install gcc-mingw-w64

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

- name: build
run: |
cargo build --release --all-features --target ${{ matrix.arch }}
cp target/${{ matrix.arch }}/release/rebar ~/.local/bin
cp target/${{ matrix.arch }}/release/rebar .
- name: compress with upx
uses: crazy-max/ghaction-upx@v3
with:
version: v4.1.0
files: |
~/.local/bin/rebar
rebar
args: --best --lzma

- name: install
run: |
mkdir -p /home/runner/.local/bin
mv rebar /home/runner/.local/bin/rebar
rebar --help
- name: upload binary
uses: actions/upload-artifact@v3
with:
Expand Down
46 changes: 44 additions & 2 deletions .github/workflows/latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:

jobs:

# ---------------------------------------------------------------------------
build:

runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,16 +47,57 @@ jobs:
- name: build
run: |
cargo build --release --all-features --target ${{ matrix.arch }}
cp target/${{ matrix.arch }}/release/rebar ~/.local/bin
cp target/${{ matrix.arch }}/release/rebar .
- name: compress with upx
uses: crazy-max/ghaction-upx@v3
with:
version: v4.1.0
files: |
~/.local/bin/rebar
rebar
args: --best --lzma

- name: install
run: |
mkdir -p /home/runner/.local/bin
mv rebar /home/runner/.local/bin/rebar
rebar --help
- name: upload binary
uses: actions/upload-artifact@v3
with:
name: rebar-${{ matrix.arch }}
path: ~/.local/bin/rebar

# ---------------------------------------------------------------------------
latest:

needs: build

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
arch:
#- aarch64-apple-darwin
#- aarch64-unknown-linux-gnu
#- aarch64-unknown-linux-musl
#- x86_64-apple-darwin
#- x86_64-pc-windows-gnu
- x86_64-unknown-linux-gnu
#- x86_64-unknown-linux-musl

steps:
- name: checkout repo
uses: actions/checkout@v3

- name: download binary from build
uses: actions/download-artifact@v3
with:
name: rebar-${{ matrix.arch }}
path: ~/.local/bin/rebar

- name: dataset download
run: |
rebar dataset download --name sars-cov-2 --tag $tag --output-dir dataset/sars-cov-2/$tag
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ jobs:
name: rebar-${{ matrix.arch }}
path: ~/.local/bin/rebar

- name: test install
run: |
ls -l /home/runner/.local/bin/
ls -l /home/runner/.local/bin/rebar
- name: dataset list
run: |
rebar dataset list
Expand Down

0 comments on commit f21aa67

Please sign in to comment.