Skip to content

Commit

Permalink
Merge pull request #36 from rage/ci
Browse files Browse the repository at this point in the history
Fix CI issues
  • Loading branch information
Heliozoa authored Sep 9, 2024
2 parents b50f3b6 + 3c0c2ee commit 49984c3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- name: Install fmt, clippy and nightly for the fmt
run: |
Expand Down Expand Up @@ -45,15 +45,15 @@ jobs:
matrix:
target: [i686-unknown-linux-gnu, x86_64-unknown-linux-gnu]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- id: "auth"
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@v2.1.5
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: "Set up Cloud SDK"
uses: google-github-actions/setup-gcloud@v2
uses: google-github-actions/setup-gcloud@v2.1.1

- name: Install dependencies
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- name: Install fmt and clippy
run: |
Expand All @@ -40,15 +40,15 @@ jobs:
if: ${{ github.event_name == 'release' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- id: "auth"
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@v2.1.5
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: "Set up Cloud SDK"
uses: google-github-actions/setup-gcloud@v2
uses: google-github-actions/setup-gcloud@v2.1.1

- name: Cargo build
run: cargo build -p tmc --release --verbose
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- name: Enable long paths for git
run: git config --system core.longpaths true # allow long paths from git deps
Expand Down Expand Up @@ -46,15 +46,15 @@ jobs:
matrix:
target: [i686-pc-windows-msvc, x86_64-pc-windows-msvc]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- id: "auth"
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@v2.1.5
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: "Set up Cloud SDK"
uses: google-github-actions/setup-gcloud@v2
uses: google-github-actions/setup-gcloud@v2.1.1

- name: Enable long paths for git
run: git config --system core.longpaths true # allow long paths from git deps
Expand All @@ -76,17 +76,13 @@ jobs:
cargo install cargo-wix
cargo wix --output installer.msi
- name: Upload msi artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
uses: svenstaro/[email protected]
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./installer.msi
asset_name: tmc-cli-rust-${{ steps.get_version.outputs.VERSION }}.msi
asset_content_type: application/octet-stream
file: "./installer.msi"
asset_name: tmc-cli-rust-$tag.msi

- name: Deploy
run: |
$env:python_version=$(python -c 'import sys; print(\".\".join(map(str, sys.version_info[:3])))')
$env:python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')
$env:CLOUDSDK_PYTHON="C:\hostedtoolcache\windows\Python\$env:python_version\x64\python"
gsutil cp target/${{ matrix.target }}/release/tmc.exe gs://${{ secrets.GCP_BUCKET }}/tmc-cli-rust/tmc-cli-rust-${{ matrix.target }}-${{ steps.get_version.outputs.VERSION }}.exe

0 comments on commit 49984c3

Please sign in to comment.