-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b88dfa5
commit f908c26
Showing
10 changed files
with
278 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Keep GitHub Actions up to date with GitHub's Dependabot... | ||
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
groups: | ||
github-actions: | ||
patterns: | ||
- "*" # Group all Actions updates into a single larger pull request | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ jobs: | |
- armv7-linux-androideabi | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
|
@@ -92,13 +92,13 @@ jobs: | |
run: rustup target add ${{ matrix.target }} | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v2 | ||
uses: android-actions/setup-android@v3 | ||
|
||
- name: Setup Android NDK | ||
uses: arqu/setup-ndk@main | ||
|
@@ -173,7 +173,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- name: Install sccache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
|
||
- name: Setup Environment (PR) | ||
if: ${{ github.event_name == 'pull_request' }} | ||
|
@@ -208,7 +208,7 @@ jobs: | |
components: rustfmt | ||
|
||
- name: Install sccache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
|
||
- name: fmt | ||
run: cargo fmt --all -- --check | ||
|
@@ -226,7 +226,7 @@ jobs: | |
with: | ||
toolchain: nightly-2024-05-02 | ||
- name: Install sccache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
|
||
- name: Docs | ||
run: cargo doc --workspace --all-features --no-deps --document-private-items | ||
|
@@ -245,7 +245,7 @@ jobs: | |
with: | ||
components: clippy | ||
- name: Install sccache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
|
||
# TODO: We have a bunch of platform-dependent code so should | ||
# probably run this job on the full platform matrix | ||
|
@@ -286,7 +286,7 @@ jobs: | |
with: | ||
toolchain: ${{ env.MSRV }} | ||
- name: Install sccache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
|
||
- name: Check MSRV all features | ||
run: | | ||
|
@@ -425,7 +425,7 @@ jobs: | |
toolchain: stable | ||
|
||
- name: Install sccache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
@@ -449,4 +449,11 @@ jobs: | |
- name: Cleanup Docker | ||
continue-on-error: true | ||
run: | | ||
docker kill $(docker ps -q) | ||
docker kill $(docker ps -q) | ||
codespell: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: pip install --user codespell[toml] | ||
- run: codespell --ignore-words-list=ans,crate,inout,ratatui,ser,stayin,swarmin,worl --skip=CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: Docker | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
description: "Release version" | ||
required: true | ||
type: string | ||
default: "" | ||
base_hash: | ||
description: "Commit hash from which to build" | ||
required: true | ||
type: string | ||
default: "" | ||
publish: | ||
description: "Publish to Docker Hub" | ||
required: true | ||
type: boolean | ||
default: false | ||
workflow_call: | ||
inputs: | ||
release_version: | ||
description: "Release version" | ||
required: true | ||
type: string | ||
default: "" | ||
base_hash: | ||
description: "Commit hash from which to build" | ||
required: true | ||
type: string | ||
default: "" | ||
publish: | ||
description: "Publish to Docker Hub" | ||
required: true | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build_and_publish: | ||
timeout-minutes: 30 | ||
name: Docker | ||
runs-on: [self-hosted, linux, X64] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Prep dirs | ||
run: | | ||
mkdir -p bins/linux/amd64 | ||
mkdir -p bins/linux/arm64 | ||
- name: Setup awscli on linux | ||
run: | | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
unzip awscliv2.zip | ||
sudo ./aws/install --update | ||
- name: Set aws credentials | ||
run: | | ||
echo "AWS_ACCESS_KEY_ID=${{secrets.S3_ACCESS_KEY_ID}}" >> $GITHUB_ENV | ||
echo "AWS_SECRET_ACCESS_KEY=${{secrets.S3_ACCESS_KEY}}" >> $GITHUB_ENV | ||
echo "AWS_DEFAULT_REGION=us-west-2" >> $GITHUB_ENV | ||
- name: Fetch release binaries | ||
run: | | ||
aws s3 cp s3://vorc/iroh-linux-amd64-${{ github.event.inputs.base_hash }} bins/linux/amd64/iroh | ||
aws s3 cp s3://vorc/iroh-relay-linux-amd64-${{ github.event.inputs.base_hash }} bins/linux/amd64/iroh-relay | ||
aws s3 cp s3://vorc/iroh-dns-server-linux-amd64-${{ github.event.inputs.base_hash }} bins/linux/amd64/iroh-dns-server | ||
aws s3 cp s3://vorc/iroh-linux-aarch64-${{ github.event.inputs.base_hash }} bins/linux/arm64/iroh | ||
aws s3 cp s3://vorc/iroh-relay-linux-aarch64-${{ github.event.inputs.base_hash }} bins/linux/arm64/iroh-relay | ||
aws s3 cp s3://vorc/iroh-dns-server-linux-aarch64-${{ github.event.inputs.base_hash }} bins/linux/arm64/iroh-dns-server | ||
- name: Build Docker image (iroh) | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: n0computer/iroh:latest,n0computer/iroh:${{ github.event.inputs.release_version }} | ||
target: iroh | ||
platforms: linux/amd64,linux/arm64/v8 | ||
file: docker/Dockerfile.ci | ||
|
||
- name: Build Docker image (iroh-relay) | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: n0computer/iroh-relay:latest,n0computer/iroh-relay:${{ github.event.inputs.release_version }} | ||
target: iroh-relay | ||
platforms: linux/amd64,linux/arm64/v8 | ||
file: docker/Dockerfile.ci | ||
|
||
- name: Build Docker image (iroh-dns-server) | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: n0computer/iroh-dns-server:latest,n0computer/iroh-dns-server:${{ github.event.inputs.release_version }} | ||
target: iroh-dns-server | ||
platforms: linux/amd64,linux/arm64/v8 | ||
file: docker/Dockerfile.ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Docs Preview | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
preview_docs: | ||
timeout-minutes: 30 | ||
name: Docs preview | ||
if: "github.event_name == 'pull_request'" | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTC_WRAPPER: "sccache" | ||
SCCACHE_GHA_ENABLED: "on" | ||
SCCACHE_CACHE_SIZE: "50G" | ||
PREVIEW_PATH: pr/${{ github.event.pull_request.number }}/docs | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly-2024-05-02 | ||
- name: Install sccache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Generate Docs | ||
run: cargo doc --workspace --all-features --no-deps | ||
env: | ||
RUSTDOCFLAGS: --cfg docsrs | ||
|
||
- name: Deploy Docs to Preview Branch | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./target/doc/ | ||
destination_dir: ${{ env.PREVIEW_PATH }} | ||
publish_branch: generated-docs-preview | ||
|
||
- name: Find Docs Comment | ||
uses: peter-evans/find-comment@v3 | ||
id: fc | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: Documentation for this PR has been generated | ||
|
||
- name: Create or Update Docs Comment | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
body: | | ||
Documentation for this PR has been generated and is available at: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.PREVIEW_PATH }}/iroh/ | ||
Last updated: ${{ github.event.pull_request.updated_at }} | ||
edit-mode: replace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ jobs: | |
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
|
||
- name: Build iroh | ||
run: | | ||
|
@@ -173,7 +173,7 @@ jobs: | |
echo "HEAD_REF=${{ github.ref }}" >> ${GITHUB_ENV} | ||
- name: Respond Issue | ||
uses: peter-evans/create-or-update-comment@v2 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
if: github.event_name == 'issue_comment' | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
|
@@ -183,7 +183,7 @@ jobs: | |
${{ steps.generate_report.outputs.NETSIM_REPORT }} | ||
- name: Respond PR | ||
uses: peter-evans/create-or-update-comment@v2 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
if: github.event.pull_request | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.