Skip to content

Commit

Permalink
fix: add macos builds to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Arqu committed May 10, 2022
1 parent 34c53da commit 094b7ca
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ jobs:
if: matrix.os != 'windows-latest'
run: |
echo "SCCACHE_DIR=${{ matrix.sccache-path }}" >> $GITHUB_ENV
- name: Set windows arch
if: matrix.os == 'windows-latest'
run: |
echo "RELEASE_ARCH=windows" >> $GITHUB_ENV
- name: Set linux arch
if: matrix.os == 'ubuntu-latest'
run: |
echo "RELEASE_ARCH=linux" >> $GITHUB_ENV
- name: Set macOS arch
if: matrix.os == 'macos-latest'
run: |
echo "RELEASE_ARCH=darwin" >> $GITHUB_ENV
- name: Install sccache (ubuntu-latest)
if: matrix.os == 'ubuntu-latest'
env:
Expand Down Expand Up @@ -127,35 +139,35 @@ jobs:

- name: build release
uses: actions-rs/cargo@v1
if: matrix.os == 'ubuntu-latest' && matrix.rust=='stable' && github.ref_name=='main'
if: matrix.os != 'windows-latest' && matrix.rust=='stable' && github.ref_name=='main'
with:
command: build
args: --release

- name: Get current iroh-gateway version
id: ig_version
if: matrix.os == 'ubuntu-latest' && matrix.rust=='stable' && github.ref_name=='main'
if: matrix.os != 'windows-latest' && matrix.rust=='stable' && github.ref_name=='main'
uses: dante-signal31/[email protected]
with:
cargo_toml_folder: iroh-gateway/

- name: push release
- name: push release iroh-gateway
uses: prewk/s3-cp-action@v2
if: matrix.os == 'ubuntu-latest' && matrix.rust=='stable' && github.ref_name=='main'
if: matrix.os != 'windows-latest' && matrix.rust=='stable' && github.ref_name=='main'
with:
aws_access_key_id: ${{ secrets.S3_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.S3_ACCESS_KEY }}
source: './target/release/iroh-gateway'
dest: 's3://vorc/iroh-gateway-linux-amd64-${{ steps.ig_version.outputs.app_version }}-${GITHUB_SHA::7}'
dest: 's3://vorc/iroh-gateway-${RELEASE_ARCH}-amd64-${{ steps.ig_version.outputs.app_version }}-${GITHUB_SHA::7}'

- name: push release - latest
uses: prewk/s3-cp-action@v2
if: matrix.os == 'ubuntu-latest' && matrix.rust=='stable' && github.ref_name=='main'
if: matrix.os != 'windows-latest' && matrix.rust=='stable' && github.ref_name=='main'
with:
aws_access_key_id: ${{ secrets.S3_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.S3_ACCESS_KEY }}
source: './target/release/iroh-gateway'
dest: 's3://vorc/iroh-gateway-linux-amd64-latest'
dest: 's3://vorc/iroh-gateway-${RELEASE_ARCH}-amd64-latest'

- name: Print sccache stats
run: sccache --show-stats
Expand Down

0 comments on commit 094b7ca

Please sign in to comment.