Skip to content

Commit

Permalink
run CI on macos-11
Browse files Browse the repository at this point in the history
  • Loading branch information
Heliozoa committed Oct 1, 2021
1 parent 329322e commit 6773f83
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 79 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
persist-credentials: false
profile: minimal
toolchain: stable
- name: Cache
uses: Swatinem/rust-cache@v1

- name: Install and build
- name: Build docs
run: cargo doc

- name: Copy index to target/doc
Expand Down
56 changes: 44 additions & 12 deletions .github/workflows/upload-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,21 @@ jobs:
armv7-unknown-linux-gnueabihf,
]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Node
uses: actions/setup-node@v2
with:
node-version: "16"
- uses: google-github-actions/setup-gcloud@master
- name: GCloud
uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
Expand All @@ -46,7 +56,7 @@ jobs:
rustup target add ${{ matrix.target }}
# build and deploy CLI
cargo build -p tmc-langs-cli --release --verbose --target ${{ matrix.target }}
cargo build -p tmc-langs-cli --release --target ${{ matrix.target }}
gsutil cp target/${{ matrix.target }}/release/tmc-langs-cli gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$TAG
# build and deploy Node module
Expand All @@ -60,19 +70,30 @@ jobs:
matrix:
target: [i686-pc-windows-msvc, x86_64-pc-windows-msvc]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Node
uses: actions/setup-node@v2
with:
node-version: "16"
- uses: google-github-actions/setup-gcloud@master
- name: GCloud
uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}

- name: Build
run: |
rustup target add ${{ matrix.target }}
$env:RUSTFLAGS="-C target-feature=+crt-static" # crt-static is set with RUSTFLAGS to statically link MSVCRT (VCRUNTIME140.dll)
cargo build -p tmc-langs-cli --release --verbose --target ${{ matrix.target }}
cargo build -p tmc-langs-cli --release --target ${{ matrix.target }}
cd ./bindings/tmc-langs-node && npm install && npm run build -- --release --target ${{ matrix.target }}
- name: Deploy
run: |
Expand All @@ -84,17 +105,28 @@ jobs:
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Node
uses: actions/setup-node@v2
with:
node-version: "16"
- uses: google-github-actions/setup-gcloud@master
- name: GCloud
uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}

- name: Cargo build
run: |
cargo build -p tmc-langs-cli --release --verbose
cargo build -p tmc-langs-cli --release
npm --prefix ./bindings/tmc-langs-node install
npm run --prefix ./bindings/tmc-langs-node build -- --release
- name: Sign
Expand Down
Loading

0 comments on commit 6773f83

Please sign in to comment.