Skip to content

Commit 6aafb4b

Browse files
First carbon version
1 parent f96b60d commit 6aafb4b

File tree

8 files changed

+555
-20
lines changed

8 files changed

+555
-20
lines changed

.github/workflows/carbon.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will run carbon version of tictactoe
2+
3+
name: carbon
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: ./tictactoe_carbon
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v4
20+
- name: Set VERSION env
21+
run: echo "VERSION=$(date -d yesterday +0.0.0-0.nightly.%Y.%m.%d)" >> "$GITHUB_ENV"
22+
- name: Setup Carbon
23+
run: |
24+
sudo apt install libgcc-11-dev
25+
wget https://github.com/carbon-language/carbon-lang/releases/download/v${{ env.VERSION }}/carbon_toolchain-${{ env.VERSION }}.tar.gz
26+
tar -xvf carbon_toolchain-${{ env.VERSION }}.tar.gz
27+
- name: Compile
28+
run: |
29+
./carbon_toolchain-${{ env.VERSION }}/bin/carbon compile --output=tictactoe_carbon.o tictactoe_carbon.carbon
30+
- name: Link
31+
run: |
32+
./carbon_toolchain-${{ env.VERSION }}/bin/carbon link --output=tictactoe_carbon tictactoe_carbon.o
33+
- name: Run
34+
run: |
35+
./tictactoe_carbon < input1.txt || true
36+
./tictactoe_carbon < input2.txt || true

.pre-commit-config.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
- id: check-builtin-literals
2929
language: python
3030
- repo: https://github.com/crate-ci/typos
31-
rev: v1.30.3
31+
rev: v1.31.1
3232
hooks:
3333
- id: typos
3434
args: []
@@ -40,7 +40,7 @@ repos:
4040
language: python
4141
args: ["--write", "--check", "--output-style=google"]
4242
- repo: https://github.com/charliermarsh/ruff-pre-commit
43-
rev: v0.11.2
43+
rev: v0.11.4
4444
hooks:
4545
- id: ruff
4646
args:
@@ -72,7 +72,7 @@ repos:
7272

7373
# golang specific
7474
- repo: https://github.com/golangci/golangci-lint
75-
rev: v2.0.1
75+
rev: v2.0.2
7676
hooks:
7777
- id: golangci-lint
7878
entry: bash -c 'cd tictactoe_go && golangci-lint run --new-from-rev HEAD --fix'
@@ -109,7 +109,7 @@ repos:
109109

110110
# c/cpp specific
111111
- repo: https://github.com/cpplint/cpplint
112-
rev: 2.0.0 # Use the ref you want to point at
112+
rev: 2.0.1 # Use the ref you want to point at
113113
hooks:
114114
- id: cpplint
115115
files: ^tictactoe_cpp/
@@ -174,17 +174,17 @@ repos:
174174

175175
# javascript specific
176176
- repo: https://github.com/pre-commit/mirrors-eslint
177-
rev: v9.23.0
177+
rev: v9.24.0
178178
hooks:
179179
- id: eslint
180180
files: ^tictactoe_javascript/
181181
args:
182182
- --fix
183183
additional_dependencies:
184-
- eslint@9.0.0
185-
- eslint-config-google@0.14.0
186-
- "@babel/eslint-parser@7.24.5-pre.2"
187-
- eslint-config-prettier@9.1.0
184+
- eslint
185+
- eslint-config-google
186+
- "@babel/eslint-parser"
187+
- eslint-config-prettier
188188
- repo: https://github.com/pre-commit/mirrors-prettier
189189
rev: v4.0.0-alpha.8
190190
hooks:
@@ -201,7 +201,7 @@ repos:
201201

202202
# ruby specific
203203
- repo: https://github.com/rubocop/rubocop
204-
rev: v1.74.0
204+
rev: v1.75.2
205205
hooks:
206206
- id: rubocop
207207

@@ -236,7 +236,7 @@ repos:
236236

237237
# Perl specific
238238
- repo: https://github.com/perltidy/perltidy
239-
rev: "20250214.03"
239+
rev: "20250311.02"
240240
hooks:
241241
- id: perltidy
242242
files: ^tictactoe_perl/

0 commit comments

Comments
 (0)