Skip to content

Commit

Permalink
Change CI to use ubuntu-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferret-san committed Nov 18, 2024
1 parent 9e6fa83 commit a41f73f
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 152 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/arbitrator-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ on:
inputs:
enable_tmate:
type: boolean
description: 'Enable tmate'
description: "Enable tmate"
required: false
default: false
merge_group:
pull_request:
paths:
- 'arbitrator/**'
- 'contracts'
- '.github/workflows/arbitrator-ci.yml'
- 'Makefile'
- "arbitrator/**"
- "contracts"
- ".github/workflows/arbitrator-ci.yml"
- "Makefile"
push:
branches:
- master

env:
RUST_BACKTRACE: 1
# RUSTFLAGS: -Dwarnings # TODO: re-enable after wasmer upgrade
# RUSTFLAGS: -Dwarnings # TODO: re-enable after wasmer upgrade
WABT_VERSION: 1.0.32

jobs:
arbitrator:
name: Run Arbitrator tests
runs-on: ubuntu-8
runs-on: ubuntu-latest
steps:
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
Expand Down Expand Up @@ -64,23 +64,23 @@ jobs:
- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
node-version: "18"
cache: "yarn"
cache-dependency-path: "**/yarn.lock"

- name: Install rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 'stable'
components: 'llvm-tools-preview, rustfmt, clippy'
toolchain: "stable"
components: "llvm-tools-preview, rustfmt, clippy"

- name: Install rust nightly
uses: dtolnay/rust-toolchain@nightly
id: install-rust-nightly
with:
toolchain: 'nightly-2024-08-06'
targets: 'wasm32-wasi, wasm32-unknown-unknown'
components: 'rust-src, rustfmt, clippy'
toolchain: "nightly-2024-08-06"
targets: "wasm32-wasi, wasm32-unknown-unknown"
components: "rust-src, rustfmt, clippy"

- name: Set STYLUS_NIGHTLY_VER environment variable
run: echo "STYLUS_NIGHTLY_VER=+$(rustup toolchain list | grep '^nightly' | head -n1 | cut -d' ' -f1)" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
# This is the name of the cache folder.
# The cache folder will be placed in the build directory,
# so make sure it doesn't conflict with anything!
actions-cache-folder: 'emsdk-cache'
actions-cache-folder: "emsdk-cache"
no-cache: true

- name: Build cbrotli-wasm
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ on:
jobs:
test:
name: Go Tests
runs-on: ubuntu-8
runs-on: ubuntu-latest

# Creates a redis container for redis tests
services:
redis:
image: redis
ports:
- 6379:6379
- 6379:6379

strategy:
fail-fast: false
Expand All @@ -39,9 +39,9 @@ jobs:
- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
node-version: "18"
cache: "yarn"
cache-dependency-path: "**/yarn.lock"

- name: Install go
uses: actions/setup-go@v4
Expand All @@ -56,17 +56,17 @@ jobs:
- name: Install rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 'stable'
targets: 'wasm32-wasi, wasm32-unknown-unknown'
components: 'llvm-tools-preview, rustfmt, clippy'
toolchain: "stable"
targets: "wasm32-wasi, wasm32-unknown-unknown"
components: "llvm-tools-preview, rustfmt, clippy"

- name: Install rust nightly
uses: dtolnay/rust-toolchain@nightly
id: install-rust-nightly
with:
toolchain: 'nightly-2024-08-06'
targets: 'wasm32-wasi, wasm32-unknown-unknown'
components: 'rust-src, rustfmt, clippy'
toolchain: "nightly-2024-08-06"
targets: "wasm32-wasi, wasm32-unknown-unknown"
components: "rust-src, rustfmt, clippy"

- name: Set STYLUS_NIGHTLY_VER environment variable
run: echo "STYLUS_NIGHTLY_VER=+$(rustup toolchain list | grep '^nightly' | head -n1 | cut -d' ' -f1)" >> "$GITHUB_ENV"
Expand Down
212 changes: 106 additions & 106 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ name: "CodeQL"

on:
push:
branches: [ "master" ]
branches: ["master"]
merge_group:
branches: [ "master" ]
branches: ["master"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
branches: ["master"]
schedule:
- cron: '18 21 * * 5'
- cron: "18 21 * * 5"

jobs:
analyze:
name: Analyze
if: github.repository == 'OffchainLabs/nitro' # don't run in any forks without "Advanced Security" enabled
runs-on: ubuntu-8
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
Expand All @@ -37,108 +37,108 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: ["go"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Install dependencies
run: sudo apt update && sudo apt install -y wabt

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
config-file: ./.github/codeql/codeql-config.yml

- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install go
uses: actions/setup-go@v4
with:
go-version: 1.21.x

- name: Install rust stable
uses: dtolnay/rust-toolchain@stable

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Cache Rust Build Products
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/
~/.cargo/git/
arbitrator/target/
arbitrator/wasm-libraries/target/
arbitrator/wasm-libraries/soft-float/SoftFloat/build
target/etc/initial-machine-cache/
key: ${{ runner.os }}-cargo-${{ steps.install-rust.outputs.rustc_hash }}-min-${{ hashFiles('arbitrator/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-${{ steps.install-rust.outputs.rustc_hash }}-

- name: Cache wabt build
id: cache-wabt
uses: actions/cache@v3
with:
path: ~/wabt-prefix
key: ${{ runner.os }}-wabt-codeql-${{ env.WABT_VERSION }}

- name: Cache cbrotli
uses: actions/cache@v3
id: cache-cbrotli
with:
path: |
target/include/brotli/
target/lib-wasm/
target/lib/libbrotlicommon-static.a
target/lib/libbrotlienc-static.a
target/lib/libbrotlidec-static.a
key: ${{ runner.os }}-brotli-3a-${{ hashFiles('scripts/build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}
restore-keys: ${{ runner.os }}-brotli-

- name: Build cbrotli-local
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
run: ./scripts/build-brotli.sh -l

- name: Cache Build Products
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Build all lint dependencies
run: make -j build-node-deps

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Install dependencies
run: sudo apt update && sudo apt install -y wabt

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
config-file: ./.github/codeql/codeql-config.yml

- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: "18"
cache: "yarn"
cache-dependency-path: "**/yarn.lock"

- name: Install go
uses: actions/setup-go@v4
with:
go-version: 1.21.x

- name: Install rust stable
uses: dtolnay/rust-toolchain@stable

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Cache Rust Build Products
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/
~/.cargo/git/
arbitrator/target/
arbitrator/wasm-libraries/target/
arbitrator/wasm-libraries/soft-float/SoftFloat/build
target/etc/initial-machine-cache/
key: ${{ runner.os }}-cargo-${{ steps.install-rust.outputs.rustc_hash }}-min-${{ hashFiles('arbitrator/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-${{ steps.install-rust.outputs.rustc_hash }}-

- name: Cache wabt build
id: cache-wabt
uses: actions/cache@v3
with:
path: ~/wabt-prefix
key: ${{ runner.os }}-wabt-codeql-${{ env.WABT_VERSION }}

- name: Cache cbrotli
uses: actions/cache@v3
id: cache-cbrotli
with:
path: |
target/include/brotli/
target/lib-wasm/
target/lib/libbrotlicommon-static.a
target/lib/libbrotlienc-static.a
target/lib/libbrotlidec-static.a
key: ${{ runner.os }}-brotli-3a-${{ hashFiles('scripts/build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}
restore-keys: ${{ runner.os }}-brotli-

- name: Build cbrotli-local
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
run: ./scripts/build-brotli.sh -l

- name: Cache Build Products
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Build all lint dependencies
run: make -j build-node-deps

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
docker:
name: Docker build
runs-on: ubuntu-8
runs-on: ubuntu-latest
services:
# local registery
registry:
Expand Down
Loading

0 comments on commit a41f73f

Please sign in to comment.